Bug Tracker

Opened 8 years ago

Closed 7 years ago

#11523 closed bug (wontfix)

in Opera, offset() returns 0's on inline elements with negative margin-right at the end of their parent

Reported by: laughinghan@… Owned by:
Priority: low Milestone: None
Component: offset Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Change History (6)

comment:1 Changed 8 years ago by laughinghan@…

This is due to .getBoundingClientRect() returning all 0's (in Opera in this edge case). This bug has been submitted to Opera, but it's also a bug in jQuery that the supposedly normalized .offset() doesn't correct for it.

comment:2 Changed 8 years ago by laughinghan@…

.getBoundingClientRect() test case: http://jsfiddle.net/puVGt/1/

comment:3 Changed 8 years ago by sindresorhus

Component: unfiledoffset
Priority: undecidedlow
Status: newopen

Confirmed in Opera 11.62 and Opera 12 alpha.

Simplified testcase: http://jsfiddle.net/mofle/cEUun/

comment:4 Changed 8 years ago by laughinghan@…

Submitted Pull Request #717 https://github.com/jquery/jquery/pull/717 fixing this and adding $.support.zeroOffset that checks for this.

comment:5 Changed 8 years ago by laughinghan@…

#717 never worked, but Pull Request 719 does, pinkie promise https://github.com/jquery/jquery/pull/719

comment:6 Changed 7 years ago by mikesherov

Resolution: wontfix
Status: openclosed

We closed the pull request because it was too large to warrant the "edge-casiness" of this. The bug was reported to opera and @miketaylr. Marking as wontfix.

Note: See TracTickets for help on using tickets.