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. I'm 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 I'm fine with retargeting this to a later version if atrol's 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 11:36

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
Affected Issues
0019943
mod - javascript/jscalendar/calendar.js Diff File