Skip to main content

Bug Tracker

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: Owned by: mikesherov
Priority: low Milestone: None
Component: offset Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

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:

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 dmethvin comment:1

component: unfiledoffset
priority: undecidedlow
status: newopen

Confirmed, it seems that we're not able to deal with "auto" there.

Changed September 05, 2012 12:55PM UTC by mikesherov comment:2

owner: → mikesherov
status: openassigned

the expected value here should be 1 and not 75, right? position includes margin, right?

Changed September 06, 2012 12:15AM UTC by mikesherov comment:3

resolution: → cantfix
status: assignedclosed

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:

In the meantime, I can't fix this. So I'm closing it as cantfix, and praying that Firefox fixes the bug!