Skip to content

Commit

Permalink
Update dom.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SanujBansal committed Sep 19, 2022
1 parent 60e3672 commit e9dc710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export function getElementPosition(element: HTMLElement, offset: number, skipFix
if (!hasScrollParent) {
top = elementRect.top + parent.getBoundingClientRect().top - offset;
}
else if (!hasPosition) {
else if (!hasPosition(element)) {
top = elementRect.top + parentTop - offset;
} else {
top = elementRect - offset;
Expand Down

0 comments on commit e9dc710

Please sign in to comment.