Side navigation
#4915 closed bug (invalid)
Opened July 17, 2009 08:34PM UTC
Closed October 02, 2009 01:40AM UTC
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: | ||
Blocked by: | Blocking: |
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]}
Attachments (0)
Change History (2)
Changed July 21, 2009 02:16AM UTC by comment:1
Changed October 02, 2009 01:40AM UTC by comment:2
resolution: | → invalid |
---|---|
status: | new → closed |
I'm closing this for lack of a test case. A "NaNpx" is an incorrect value to use for a css measurement. jQuery shouldn't be trying to screen out invalid values passed by the caller.
Can you provide a test case? The thread referenced doesn't have one.