Side navigation
#15201 closed bug (migrated)
Opened August 01, 2014 02:33AM UTC
Closed October 21, 2014 12:50AM UTC
.offset() thinks all elements in the ShadowDom are disconnected, and thus as 0,0
Reported by: | rictic | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | offset | Version: | 2.1.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
JSBin link to reproduce: http://jsbin.com/tamugo/2/edit (try in Chrome (or Firefox with dom.webcomponents.enabled turned on))
An element that is in the shadow dom appears in some ways to not be contained in the document. .offset() assumes that if the element isn't contained in the document then it's disconnected and returns an offset of {top: 0, left: 0}.
When .offset() checks to see if the element is disconnected it could try walking up the DOM not only by checking .parentNode as .contains() does but also by looking at .host, which is how one travels up from a shadow root into its containing element.
Attachments (0)
Change History (2)
Changed August 01, 2014 03:42PM UTC by comment:1
component: | unfiled → offset |
---|---|
priority: | undecided → low |
status: | new → open |
Changed October 21, 2014 12:50AM UTC by comment:2
resolution: | → migrated |
---|---|
status: | open → closed |
Migrated to https://github.com/jquery/jquery/issues/1784