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
* fix popper's behavior when it doesn't have any parents (#136)
* cache getOffsetParent instead of calling it twice
* refactor to make code a bit more readable
* add test for the popper without parents
* improved comment
* Simplified condition logic
When popper doesn't have any positioned or scrollable parents, its behavior on scroll is a bit broken. Examples:
Popper is okay, moves with ref element as expected:
https://codepen.io/nadiam84/pen/PWqVKo
Popper stays on the same place when scrolled, although it shouldn't:
https://codepen.io/nadiam84/pen/xgGMrz
The only difference in those two codepens is that the parent has 'position: relative'.
The text was updated successfully, but these errors were encountered: