Ticket #10483 (closed bug: invalid)
NAN value on 1.6.4 version
| Reported by: | Hagau Ioan | Owned by: | Hagau Ioan |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.6.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hi, I used the "slideToggle" from jquery version "jquery-1.6.4.min.js" on one big DIV element. The "DIV" element has inside more html elements. In internet explorer 8 (maybe on FF too) when I try to load the slideToggle function on this big DIV I received an error. Not sure what was the real cause of error but during my investigation I found a bug into the jquery:
| a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}) |
There are situations when "a" variable is "NAN". Because of this I got some errors. So I placed this check routine inside:
if(isNaN(a.now)){return;}
And all my problems gone.
| a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}) |
Change History
comment:1 Changed 20 months ago by dmethvin
- Owner set to Hagau Ioan
- Status changed from new to pending
comment:2 Changed 19 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
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 Changed 10 months ago by anonymous
Had the same problem. But this fix seems to work. Don't know what causes "a" to be NaN though. Still fairly new to jQuery.
comment:4 Changed 7 months ago by anonymous
I ran into the same issue, but I do not have jsFiddle in my application. Instead I wrote my own code that targeted to center a div popup box by accessing width, height, outerWidth, and outerHeight from the window object and the div popup box itself.
It is clear that the issue happens in IE8 browser, currently I am testing on version 8.0.6001.19019.
So I went ahead and implemented the fixings accordingly instructions above and it solves the case. My div popup box still is being centered hen I scroll the window down and up.
The very same issue was found in the more recent jQuery versions which means that bug prevents jQuery being cross browser compatible for IE8. Any new release of jQuery requires to be touched in other to preserve backward compatibility, until IE8 has being killed.
Here are the details where I implement that fix. jQuery-1.4.2.min.js (line:144 Column:175) jQuery-1.4.4.min.js (line:156 Column:251) jQuery-1.7.1.js (line:8824 Column:31)
At the moment I am writting whit comment, jQuery-1.8.0 is already available for download. I inspected the code and it looks away different. I did not test yet, but comments about backward compatibility are in place.
Probably issue is fixed in the 1.8.0 version, anyway I hope this comment help people find solution for the bug when using old jQuery versions.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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!
We need to know the inputs that would cause this problem, the test case will make this clear.
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.