Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11954 closed bug (duplicate)

Return unite is invalid whith .css

Reported by: Frackher Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


I think it might be a bug.

Two examples, one returning marginLeft, the other left. For the first one the value is in px. http://jsfiddle.net/7bZhk/10/

For the second the value is in percent (and that's what should be). http://jsfiddle.net/Jj8Z3/2/

Change History (5)

comment:1 Changed 11 years ago by mikesherov

Resolution: duplicate
Status: newclosed

This is a bug in webkit, and noted in source ( https://github.com/jquery/jquery/blob/master/src/css.js#L566), and is a dupe of #9505.

Notice who is commenting on that bug report ;) https://bugs.webkit.org/show_bug.cgi?id=29084#c16

If anything, we're going to normalize to pixels, because that's the direction the browsers are going in, and is more useful for us internally.

btw, I had also submitted a bug to W3C: https://www.w3.org/Bugs/Public/show_bug.cgi?id=16389

comment:2 Changed 11 years ago by mikesherov

Duplicate of #9505.

comment:3 Changed 11 years ago by Frackher

Oh, yes sorry I posted too ealy without verifying on the older, I wasn't able to formulate correctly the bug.

Maybe in the doc can we make a note for this particular case ?

comment:4 Changed 11 years ago by mikesherov

No need to be sorry :-)

I'm personally reluctant to enumerate and document all the ways in which getComputedStyle returns inconsistent results... it'll be the longest doc page on the site.

Also, in 1.8, "top" and "left" will be fixed, and only "bottom" and "right" will be faulty. Hopefully by then, webkit fixes the bug too!

comment:5 Changed 11 years ago by Frackher

Yeah hope too ! Meanwhile I'll made a function to return the value in percent and not in px ;).

BTW, nothing to do here, but I can't receive my password by email (and so on I can't havec access to my account) Any Idea ?

Note: See TracTickets for help on using tickets.