Modify ↓
Ticket #6848 (closed bug: invalid)
style function fails to check for parseFloat(value) == NaN causing IE6 error
| Reported by: | crispi | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | css | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
This error only occurs in IE6 - other browsers appear to tolerate it. When the style function is called and a null or non-float value is passed for name = "height", IE6 errors out.
Change History
comment:2 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
Can you reopen with a test case? I am not sure why it would be necessary to check for NaN. This works in IE6:
$("div").width("14px");
$("div").css("width", "auto");
These do not but they are passing invalid input to jQuery:
$("div").width("sorry"); // not a number
$("div").css("width", "0.2km"); // invalid units
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Changing the code to this appears to fix it:
}