Skip to content

Commit

Permalink
Fix IntersectionObserver overflow: clip on zero-sized elements.
Browse files Browse the repository at this point in the history
I realized my fix in bug 1769512 (using IsEmpty()) wasn't quite correct
in this case, because IntersectionObserver preserves edge-inclusive
intersections.

Differential Revision: https://phabricator.services.mozilla.com/D147078

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1770729
gecko-commit: 6fb2ab75b12bbd9708b2476aa2c5e520b776ff02
gecko-reviewers: jwatt
  • Loading branch information
emilio authored and pull[bot] committed Oct 26, 2023
1 parent 01c918e commit 1219311
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion intersection-observer/zero-area-element-visible.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
width: 0px;
height: 0px;
}
#container {
overflow: clip;
}
</style>

<div id='target'></div>
<div id="container">
<div id='target'></div>
</div>

<script>
var entries = [];
Expand Down

0 comments on commit 1219311

Please sign in to comment.