Bug Tracker

Opened 7 years ago

Closed 6 years ago

#12139 closed bug (fixed)

ie7 offsetParent bug

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

Description

$("<div>").css({"position":"absolute"}).appendTo(document.body).offsetParent()[0].tagName in ie6 7

it return "HTML",not "BODY".

Change History (4)

comment:2 Changed 7 years ago by sindresorhus

Component: unfiledoffset
Priority: undecidedlow
Status: newopen
Version: 1.7.21.8.0

Confirmed.

Other browsers return 'body', which is the correct element to return.

Spec: http://www.w3.org/TR/cssom-view/#offset-attributes

comment:3 in reply to:  2 Changed 7 years ago by sexnothing@…

Replying to sindresorhus:

Confirmed.

Other browsers return 'body', which is the correct element to return.

Spec: http://www.w3.org/TR/cssom-view/#offset-attributes

in version 1.8.0,it don't fix this bug at ie7,it still return "HTML" not "BODY",i don't kown why

comment:4 Changed 6 years ago by David Fox

Resolution: fixed
Status: openclosed

Fixes #12139, make sure absolutely positioned elements have HTML as offsetParent, closes gh-1010

Changeset: 8121309694630d3cb29e5b8dc4ad81527a5bb494

Note: See TracTickets for help on using tickets.