#10688 closed defect (fixed)
TypeError: a.curCSS is not a function (Trac 1.1.1dev-r11469)
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | AdminEnumListPlugin |
Severity: | normal | Keywords: | |
Cc: | Stepan Riha, Jun Omae | Trac Release: | 1.2 |
Description (last modified by )
The following errors are seen with Trac 1.1.1dev-r11469
:
Firefox 16:
[10:46:52.715] TypeError: a.curCSS is not a function @ http://localhost:8000/tracdev/chrome/common/js/jquery-ui.js:5
Chrome 23:
Uncaught TypeError: Object function (a,b){return new p.fn.init(a,b,c)} has no method 'curCSS'
Trac 1.0
has:
- jQuery 1.7.2
- jQuery UI 1.8.21
Trac 1.1.1dev
has:
- jQuery 1.8.2 (since t:r11412)
- jQuery UI 1.8.21
There is an incompatibility between jQuery 1.8 and jQuery UI < 1.8.22, as described here. I'll open a ticket for this in the Trac core, and implement a workaround in the plugin code.
Attachments (0)
Change History (12)
comment:1 Changed 12 years ago by
Status: | new → assigned |
---|
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 12 years ago by
comment:4 Changed 12 years ago by
After r12417, the following error happens with Trac 0.11.7.
Timestamp: 2012-12-09 20:51:02 Error: too much recursion Source File: http://localhost:3000/chrome/common/js/jquery.js Line: 11
Applying the following patch, it works on Trac 0.11.7, 0.12.4, 1.0 and trunk (t:r11479).
-
adminenumlistplugin/htdocs/adminenumlist.js
14 14 // Trac 1.1.1dev @r11479 provides jQuery UI 1.8.21 and jQuery 1.8.2 15 15 // http://bugs.jquery.com/ticket/11921 16 16 if(!$.isFunction($.fn.curCSS)) 17 $. curCSS = $.css;17 $.fn.curCSS = $.fn.css; 18 18 19 19 var mouseY, lastY = 0; 20 20
comment:5 Changed 12 years ago by
Thanks, I'll apply that fix. That is interesting though. It must be an issue with an older version of jQuery then? The line in my patch was copied from the jQuery UI patch.
comment:6 Changed 12 years ago by
In Chrome 23 and the latest Trac trunk, I'm still seeing an error in the JS console after applying the patch:
Uncaught TypeError: Object function (a,b){return new p.fn.init(a,b,c)} has no method 'curCSS'
The plugin seems to work fine though.
comment:7 Changed 12 years ago by
Maybe we have a different issue here though. In the jQuery ticket it was noted that curCSS
has been deprecated since jQuery 1.3 and was removed in 1.8. With Trac 0.11.7 we are working with jQuery 1.2.6. The conditional was intended to evaluate to false
for jQuery < 1.8, since curCSS
should still be available (though deprecated).
comment:8 Changed 12 years ago by
Oh, sorry. I mistook. I rework..., the fix needs checking existence of $.curCSS
instead of $.fn.curCSS
.
$.cssCSS | $.fn.curCSS | notes | |
0.11.7 | function | undefined | jQuery 1.2.6 |
0.12.4 | function | undefined | jQuery 1.4.4 |
1.0 | function | undefined | jQuery 1.7.2 |
trunk | undefined | undefined | jQuery 1.8.2 |
-
adminenumlistplugin/htdocs/adminenumlist.js
13 13 // Workaround for issue when using jQuery UI < 1.8.22 with jQuery 1.8 14 14 // Trac 1.1.1dev @r11479 provides jQuery UI 1.8.21 and jQuery 1.8.2 15 15 // http://bugs.jquery.com/ticket/11921 16 if(!$.isFunction($. fn.curCSS))16 if(!$.isFunction($.curCSS)) 17 17 $.curCSS = $.css; 18 18 19 19 var mouseY, lastY = 0;
comment:9 Changed 12 years ago by
Thanks, that works for me too. I can extend your list as follows:
$.curCSS | $.fn.curCSS | notes | |
0.11.0 | function | undefined | jQuery 1.2.3 |
comment:10 Changed 12 years ago by
comment:11 Changed 12 years ago by
In [12463] I had to check for $.fn.prop
; checking for $.prop
didn't seem to work. The only difference I see between these two cases is the possibility that jQuery might treat a function alias differently than a function.
comment:12 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've filed a ticket in Trac for the jQuery/jQuery UI compatibility issue in t:#10976.