Skip to main content

Bug Tracker

Side navigation

#10079 closed bug (invalid)

Opened August 17, 2011 07:55PM UTC

Closed August 18, 2011 02:48PM UTC

Last modified October 18, 2012 04:37PM UTC

jQuery is not handling numbers return with Exponent by Firefox 5

Reported by: antitoxic@gmail.com Owned by: antitoxic@gmail.com
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?

Attachments (0)
Change History (9)

Changed August 17, 2011 08:18PM UTC by Anton Stoychev <antitoxic@gmail.com> comment:1

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?

Changed August 17, 2011 08:32PM UTC by Anton Stoychev <antitoxic@gmail.com> comment:2

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

Changed August 17, 2011 08:38PM UTC by rwaldron comment:3

component: unfiledcss
milestone: None1.6.3
owner: → antitoxic@gmail.com
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.

Changed August 18, 2011 08:01AM UTC by Anton Stoychev <antitoxic@gmail.com> comment:4

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?

Changed August 18, 2011 02:48PM UTC by rwaldron comment:5

resolution: → invalid
status: pendingclosed

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

Changed August 26, 2011 01:36AM UTC by dmethvin comment:6

milestone: 1.6.3

Changed April 30, 2012 02:16PM UTC by JiDW comment:7

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.

Changed October 18, 2012 03:46PM UTC by thorn comment:8

+1

it is NOT a jQuery UI issue

Changed October 18, 2012 04:37PM UTC by mikesherov comment:9

This is not a bug anyway.