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
offsetParent returns null ... if the element has position property set to fixed. (firefox returns <body>)
I have a fixed element somewhere along the shared DOM as first child, which gets picked for input to the getOffsetParent method. Chrome initializes the offsetParent to null, and continues finding the correct offsetParent eventually. Firefox initializes the offsetParent variable to < body > instead. It messes up the position calculations where I attach popper to a different reference element.
I do not currently have the time to create the CodePen sample to replicate the issue, but I may be able to do it a little later. The bug appears in a really specific DOM configuration! And, I'm using tippy library, so it will take extra effort to isolate the bug to using only popper and/or approved libraries here.
I hope the code & documentation case is clear.
Let me know if you have any questions or concerns!
The text was updated successfully, but these errors were encountered:
Hey all,
There's a very specific bug I encountered with Firefox where the offset element is computed inside popper.js.
Based on MDN spec page for DOM offsetParent property:
I have a fixed element somewhere along the shared DOM as first child, which gets picked for input to the getOffsetParent method. Chrome initializes the offsetParent to null, and continues finding the correct offsetParent eventually. Firefox initializes the offsetParent variable to < body > instead. It messes up the position calculations where I attach popper to a different reference element.
The related function is
getOffsetParent
.I do not currently have the time to create the CodePen sample to replicate the issue, but I may be able to do it a little later. The bug appears in a really specific DOM configuration! And, I'm using tippy library, so it will take extra effort to isolate the bug to using only popper and/or approved libraries here.
I hope the code & documentation case is clear.
Let me know if you have any questions or concerns!
The text was updated successfully, but these errors were encountered: