#10079 closed bug (invalid)
jQuery is not handling numbers return with Exponent by Firefox 5
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | css | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I stumbled on this bug when dealing with high z-index values and ui.dialog widget. By large I mean something like 10000000
When called getComputedStyle in the jQuery curCSS can return something like 1e+7. Which when parsed as integer will become 1.
Can jQuery support parsing numbers in such format or this is firefox bug?
Change History (9)
comment:1 Changed 11 years ago by
comment:3 Changed 11 years ago by
Component: | unfiled → css |
---|---|
Milestone: | None → 1.6.3 |
Owner: | set to [email protected]… |
Status: | new → pending |
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!
Additionally, 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.
comment:4 Changed 11 years ago by
Here's the test case: http://jsfiddle.net/rembF/19/
There's a Firefox >=5 bug involved as well.
Can someone please move this bug to jQuery UI core because I just saw that $.fn.zIndex is part of ui.core?
comment:5 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
You'll have to re-file with UI, there is no mechanism to just "move" a ticket.
comment:6 Changed 11 years ago by
Milestone: | 1.6.3 |
---|
comment:7 Changed 11 years ago by
I think this is an issue of jquery, not jqueryUI
getComputedStyle indeed return an exponential value. Even if $.fn.zIndex exists in jqueryUI, jqueryUI uses jquery.css to get zIndex. And it is jquery.css that uses getComputedStyle, so you can't correct this bug in jqueryUI core function.
Can you reopen this ticket please ?
At this time we have to use native .style.zIndex on the element to get the correct z Index.
Math object methods such as round and abs can convert a string "1e+7" to integer but parseInt will see the 1 in the beginning just return this.
So why not incorporate this into getComputedStyle?