You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally it should return top: 100px but it is returning
{
top: 0,
left: 0,
height: 0,
width: 0
}
However, getComputedStyle returns correct position values.
I have create a codepen here for this scenario https://codepen.io/yamraaaj/pen/BaZdPKm. I suspect other utils might not be working inside Shadow DOM as well.
The text was updated successfully, but these errors were encountered:
It seems to happen because the owner document of a node inside a document fragment is the external document. And within the offset helper code, if the node is not contained in its owner document, the calculation returns an object will all zeroes.
Dom Helpers does not seem to working properly inside Web Component shadow dom. I am trying to use
offset
method to get the offset of an element.Ideally it should return top: 100px but it is returning
However,
getComputedStyle
returns correct position values.I have create a codepen here for this scenario https://codepen.io/yamraaaj/pen/BaZdPKm. I suspect other utils might not be working inside Shadow DOM as well.
The text was updated successfully, but these errors were encountered: