Skip to content

Commit

Permalink
Fixed: False positive hidden iframe detection when HTML element is ze…
Browse files Browse the repository at this point in the history
…ro height #1309 #1311
  • Loading branch information
davidjbradshaw committed Aug 20, 2024
1 parent eec6377 commit f954eaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/child/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,8 @@ The <b>size()</> method has been deprecated and replaced with <b>resize()</>. U
log(`Size unchanged: ${sizes}`)
return Math.max(boundingSize, scrollSize)

case boundingSize === 0:
case boundingSize === 0 &&
document.body.getBoundingClientRect().bottom === 0:
log(`Page is hidden: ${sizes}`)
return scrollSize

Expand Down

1 comment on commit f954eaa

@davidjbradshaw
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break width resizing.

Please sign in to comment.