Opened 12 years ago
Closed 12 years ago
#7116 closed enhancement (fixed)
jQuery tries to set "NaNpx" and "nullpx" as CSS size values
Reported by: | trevorparscal | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.4.3 |
Component: | css | Version: | 1.4.2 |
Keywords: | NaNpx nullpx css height width | Cc: | |
Blocked by: | Blocking: |
Description
When setting width or height on an element, if size is null or NaN, it is rendered to a string and appended with 'px', such as 'nullpx' or 'NaNpx'. In Internet Explorer this causes errors to be thrown.
While it's not jQuery's fault that the bad data has been given to the height() or width() functions, this should be handled more elegantly than performing generic string conversion to anything that's not a string.
Attachments (1)
Change History (4)
Changed 12 years ago by
Attachment: | jquery.js.patch added |
---|
comment:2 Changed 12 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Note: See
TracTickets for help on using
tickets.
Adds robust integer parsing and conditionally defaults to zero if the result is NaN