Bug Tracker


Ticket #8316 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

.offset() setter works incorrectly in Webkit for fixed position elements that haven't defined left/top style properties

Reported by: scott.gonzalez Owned by: john
Priority: blocker Milestone: 1.5.2
Component: offset Version: 1.5
Keywords: Cc:
Blocking: Blocked by:


If an element has position: fixed, but doesn't specify a left or top style property, calling .offset({...}) does not position the element correctly.


related jQuery UI bug:  http://bugs.jqueryui.com/ticket/7006

Change History

comment:1 Changed 3 years ago by jitter

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

 test case replicated on jsfiddle.

comment:2 Changed 3 years ago by murz

I have a proposed fix for this issue. Pull request is here:  https://github.com/jquery/jquery/pull/246

comment:3 Changed 3 years ago by ajpiano

  • Priority changed from high to blocker
  • Milestone changed from 1.next to 1.5.2

comment:4 Changed 3 years ago by john

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

comment:5 Changed 3 years ago by Michael Murray

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

Offset setter for fixed position elements in Webkit. Fixes #8316.

Changeset: e8f4629b924cae0b0f1847d2368031f06bc08149

comment:6 Changed 3 years ago by anonymous

possible related issue: getting the offset for a auto-positioned child of a fixed-position element doesn't return the correct value.

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


Add a comment

Modify Ticket

as closed

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

Note: See TracTickets for help on using tickets.