Opened 11 years ago
Closed 10 years ago
#11813 closed bug (cantfix)
$(el).position().left returns wrong value in webkit browsers
Reported by: | 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.
Change History (3)
comment:1 Changed 11 years ago by
Component: | unfiled → offset |
---|---|
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 10 years ago by
Owner: | set to mikesherov |
---|---|
Status: | open → assigned |
the expected value here should be 1 and not 75, right? position includes margin, right?
comment:3 Changed 10 years ago by
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.