#9805 closed bug (invalid)
Error in Firefox 3.6.18 with minified jquery
Reported by: | software | Owned by: | software |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | misc | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have tested our webapplication in Firefox 3.6.18, Firefox 5, IE 8 and Chrome 12.0.742.112. This big appers only in Firefox 3.6.18 and only with jquery-1.6.2.min.js. With uncompressed version of jquery 1.6.2 (jquery-1.6.2.js) exists no problems.
Error in Firefox 3.6.18: Error: i.exec is not a function Sourcefile: ../jquery-1.6.2.min.js Row: 16
"i.exec" appers only one times in jquery-1.6.2.min.js. I looking for this equivalent in jquery-1.6.2.js and founded it on row 133.
Change History (8)
comment:1 Changed 12 years ago by
Component: | unfiled → misc |
---|---|
Owner: | set to software |
Priority: | undecided → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:3 follow-up: 4 Changed 12 years ago by
I met the same issue and solved it.
It was caused by a variable called "i" which was wrongfully global in my code. Very classic mistake:
for(i = 0; i < max; i++) {
It did interfere with the minify version of jQuery which uses a variable named "i" that Firefox 3.6.18 considers as global for an unknown reason.
The same thing happens if you use a global variable name "quickExpr" with the uncompressed version of jQuery ("quickExpr" is the uncompressed version of "i").
That is why the problem happens only with minified versions, and only with specific Firefox versions.
Juste spent 2 hours on that one. Should use jslint...
comment:4 Changed 11 years ago by
So how did you resolve the issue? did you have to change your code, or the minified version of jquery?
comment:5 Changed 11 years ago by
I found the same issue too in FF 3.6.23, where the non-minified version worked fine.
To fix it, look for any "i" variables in your code and rename it to something else - i.e. iter
This cleared the issue and allowed the minified version to work again.
Typically the issue happens where jQuery is called in a scope where "i" is present (and I usually use "i" for loops - perhaps this could be corrected on the minifier?)
comment:6 Changed 11 years ago by
I'm confused. Neither quickExpr nor i is global even in the minified version of jQuery.
comment:7 Changed 11 years ago by
If it helps anyone, I had the same problem and after removing all instances of 'i' in my code finally traced it down to JQuery UI. If I include jquery-ui-1.8.16.custom.min.js I get the problem - it I do not use jquery-ui-1.8.16.custom.min.js the problem goes away.
I love JQuery, but I have to ask - why on earth use i globally in your compressed library? It is just asking for trouble - IMHO this IS a bug and should be fixed.
comment:8 Changed 11 years ago by
Hi, I had such problem in FF 3.6.28 (and 1.5, 3.0.19). Fix - pack jquery.js with another packer. For example Dean Edvards packer., with unchecked "Base62 encode", "Shrink variables".
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.