View Issue Details

IDProjectCategoryView StatusLast Update
0019943mantisbtuipublic2015-09-06 17:37
Reporterbadfiles 
Assigned Toatrol 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.2 
Target Version1.3.0-beta.3Fixed in Version1.3.0-beta.3 
Summary0019943: Buggy calendar in due date
Description

In Google Chrome Version 45.0.2454.7 dev (64-bit)

calendar.js drops console errors, and calendar itself appears at the bottom of a page.

Additional Information

Refused to evaluate a string as JavaScript because unsafe-eval is not an allowed source of script in the following Content Security Policy directive: default-src self. Note that script-src was not explicitly set, so default-src is used as a fallback.
Calendar.showAtElement @ calendar.js:14
d.(anonymous function) @ calendar-setup.js:14

TagsNo tags attached.

Relationships

related to 0020040 closedsyncguru Replace jscalendar by a newer widget 

Activities

atrol

atrol

2015-07-19 05:33

developer   ~0051093

Same for Safari, FF works.

atrol

atrol

2015-08-02 15:55

developer   ~0051171

Caused by
if (Calendar.is_khtml)
setTimeout(Calendar.continuation_for_the_fucking_khtml_browser(), 10);
in calendar.js

This explains why the code does not work
https://developer.chrome.com/extensions/contentSecurityPolicy#JSEval

I am quite sure the special handling for khtml can be removed as this seems to be a quite old workaround.
At least Safari works after changing user agent.

dregad

dregad

2015-08-02 17:56

developer   ~0051180

We really need to replace this widget...

badfiles

badfiles

2015-08-10 08:13

reporter   ~0051222

PR https://github.com/mantisbt/mantisbt/pull/628/

atroladmin

atroladmin

2015-08-15 05:50

administrator   ~0051260

Reminder sent to: dregad, vboctor

I am not sure if it is a good idea to replace the widget in 1.3.x (of course we should in 2.0) as it might introduce even more delay in getting out 1.3.

I could push a version that changes what I mentioned at 0019943:0051171
I tested the change and it works for Chrome, FF and Safari.

vboctor

vboctor

2015-08-16 17:16

manager   ~0051273

+1 for deferring to post 1.3. Im thinking that we should create the master-1.3.x branch and open master for modern UI and improvements like this. We should also get 1.3.x out soon (whether it is beta3 or rc1).

dregad

dregad

2015-08-17 03:18

developer   ~0051275

We definitely need to fix the bug with jscalendar in 1.3, one way or another.

That being said, I agree that replacing the calendar widget, although nice to have, is not a must for 1.3 release so Im fine with retargeting this to a later version if atrols fix does the trick.

atrol

atrol

2015-08-17 15:58

developer   ~0051286

Fixed the current issue, entered 0020040 for the replacement.

Related Changesets

MantisBT: master 103f968f

2015-08-17 15:36:12

atrol

Details Diff
Fix broken calendar in Safari and Chrome

As we introduced CSP headers in 1.3 some JavaScript code in our calendar
widget is no longer allowed.
https://developer.chrome.com/extensions/contentSecurityPolicy#JSEval
The affected code seems to be a workaround for quite old browsers.
I removed the code and found no issues until now.

Fixes 0019943
mod - javascript/jscalendar/calendar.js Diff File

Issue History

Date Modified Username Field Change
2015-07-18 07:06 badfiles New Issue
2015-07-19 05:33 atrol Status new => confirmed
2015-07-19 05:33 atrol Product Version git trunk => 1.3.0-beta.2
2015-07-19 05:33 atrol Target Version => 1.3.0-beta.3
2015-07-19 05:33 atrol Note Added: 0051093
2015-08-02 15:55 atrol Note Added: 0051171
2015-08-02 17:56 dregad Note Added: 0051180
2015-08-10 08:13 badfiles Note Added: 0051222
2015-08-10 12:43 dregad Relationship added related to 0015281
2015-08-15 01:01 vboctor Assigned To => community
2015-08-15 01:01 vboctor Status confirmed => assigned
2015-08-15 05:50 atroladmin Note Added: 0051260
2015-08-16 17:16 vboctor Note Added: 0051273
2015-08-17 03:18 dregad Note Added: 0051275
2015-08-17 15:51 atrol Changeset attached => MantisBT master 103f968f
2015-08-17 15:51 atrol Assigned To community => atrol
2015-08-17 15:51 atrol Status assigned => resolved
2015-08-17 15:51 atrol Resolution open => fixed
2015-08-17 15:51 atrol Fixed in Version => 1.3.0-beta.3
2015-08-17 15:55 atrol Relationship added related to 0020040
2015-08-17 15:58 atrol Note Added: 0051286
2015-08-17 15:58 atrol Relationship deleted related to 0015281
2015-09-06 17:37 vboctoradmin Status resolved => closed