Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#10079 closed bug (invalid)

jQuery is not handling numbers return with Exponent by Firefox 5

Reported by: antitoxic@… Owned by: antitoxic@…
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 8 years ago by Anton Stoychev <antitoxic@…>

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?

comment:2 Changed 8 years ago by Anton Stoychev <antitoxic@…>

One more thing: parseInt is used in $.fn.zIndex()

comment:3 Changed 8 years ago by Rick Waldron

Component: unfiledcss
Milestone: None1.6.3
Owner: set to antitoxic@…
Status: newpending

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 8 years ago by Anton Stoychev <antitoxic@…>

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 8 years ago by Rick Waldron

Resolution: invalid
Status: pendingclosed

You'll have to re-file with UI, there is no mechanism to just "move" a ticket.

comment:6 Changed 8 years ago by dmethvin

Milestone: 1.6.3

comment:7 Changed 7 years ago by JiDW

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.

comment:8 Changed 6 years ago by thorn

+1 it is NOT a jQuery UI issue

comment:9 Changed 6 years ago by mikesherov

This is not a bug anyway.

Note: See TracTickets for help on using tickets.