Bug Tracker

Modify

Ticket #11813 (closed bug: cantfix)

Opened 13 months ago

Last modified 10 months ago

$(el).position().left returns wrong value in webkit browsers

Reported by: julijan.andjelic@… Owned by: mikesherov
Priority: low Milestone: None
Component: offset Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 12 months ago by dmethvin

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to offset

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

comment:2 Changed 10 months ago by mikesherov

  • Owner set to mikesherov
  • Status changed from open to assigned

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

comment:3 Changed 10 months ago by mikesherov

  • Status changed from assigned to closed
  • Resolution set to cantfix

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!

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.