W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2016

Re: [csswg-drafts] HTMLElement.prototype.offsetParent leaks a node inside a shadow tree

From: Anton Platonov via GitHub <sysbot+gh@w3.org>
Date: Wed, 15 Jun 2016 08:23:46 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-226120778-1465979026-sysbot+gh@w3.org>
@rniwa then it looks like it's now completely impossible to discover 
for the node C that it's inside a fixed container.

We have a component that should behave differently inside a fixed 
container. So we use a fixed container detection. Previously, it was 
safe to walk through `.offsetParent`s chain and check their computed 
styles. Now the detection is broken.

Aside from that, `offsetParent` has another use case: for an 
absolutely positioned node it points to the containing block. This is 
also broken here. In my example, if I assign `position: absolute` to 
the node C, its containing block will be the node B, but 
`offsetParent` will be null.

GitHub Notification of comment by platosha
Please view or discuss this issue at 
using your GitHub account
Received on Wednesday, 15 June 2016 08:23:48 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:40:59 UTC