Side navigation
#11813 closed bug (cantfix)
Opened May 24, 2012 03:24PM UTC
Closed September 06, 2012 12:15AM UTC
$(el).position().left returns wrong value in webkit browsers
Reported by: | julijan.andjelic@gmail.com | Owned by: | mikesherov |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | offset | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In webkit browsers $(el).position().left returns 1 when the elements has margin set to auto, while it works fine in other browsers.
Please have a look at this JSfiddle to get the idea what am I talking about: http://jsfiddle.net/QHSBQ/
If you run it in chrome it will alert 1 and in firefox it will alert 75, which is the expected value.
Attachments (0)
Change History (3)
Changed June 12, 2012 01:48PM UTC by comment:1
component: | unfiled → offset |
---|---|
priority: | undecided → low |
status: | new → open |
Changed September 05, 2012 12:55PM UTC by comment:2
owner: | → mikesherov |
---|---|
status: | open → assigned |
the expected value here should be 1 and not 75, right? position includes margin, right?
Changed September 06, 2012 12:15AM UTC by comment:3
resolution: | → cantfix |
---|---|
status: | assigned → closed |
So, firefox incorrectly reports 0px. It's actually a well known bug that I've advocated for fixing for a while. I just poked them about it. The bug reports are here:
https://bugzilla.mozilla.org/show_bug.cgi?id=381328
https://bugzilla.mozilla.org/show_bug.cgi?id=610966
In the meantime, I can't fix this. So I'm closing it as cantfix, and praying that Firefox fixes the bug!
Confirmed, it seems that we're not able to deal with "auto" there.