Ticket #4915 (closed bug: invalid)
Setting Style object measurement property to 'NaNpx' in IE
| Reported by: | Damon | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.2 |
| Component: | core | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
This bug has been widely reported on the net. See
http://groups.google.com/group/jquery-en/browse_thread/thread/f58c3172a5f52f20
for an example discussion, including a code fix at the very bottom.
The issue, as we understand it, is that when jQuery is accessing a hidden element (CSS display property set to none) in IE, it produces 'NaNpx' as a measurement. For us, it was the lineHeight property on a hidden form select that we were populating using that element's .html method. (Using $.loadJson to construct option elements that we dumped in via .html.)
The error occurs in line 1061 of jquery-1.3.2.js.
if ( set ) {
event[name] = value
The fix is to check for value=='NaNpx' and, if so, change value to a blank string.
if ( set ) {
if (value=='NaNpx'){value = } event[name] = value
For what it's worth, the listserv post I linked above recommended patching the minimized version of jquery-1.3.2 the same way.
search for this return N.toUpperCase()});if(L){ insert this if(K=='NaNpx'){K=} before this J[G]=K}return J[G]}
result: return N.toUpperCase()});if(L){if(K=='NaNpx'){K=}J[G]=K}return J[G]}
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Can you provide a test case? The thread referenced doesn't have one.