Skip to content

Commit eacaeed

Browse files
authored
Update anchored-position.ts
1 parent e973548 commit eacaeed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/anchored-position.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function isOnTopLayer(element: Element) {
206206
function getClippingRect(element: Element): BoxPosition {
207207
let parentNode: typeof element.parentNode = element
208208
while (parentNode !== null) {
209-
if (parentNode === document.body) {
209+
if (!(parentNode instanceof Element)) {
210210
break
211211
}
212212
const parentNodeStyle = getComputedStyle(parentNode as Element)

0 commit comments

Comments
 (0)