Skip to content

Commit 1219311

Browse files
emiliopull[bot]
authored andcommitted
Fix IntersectionObserver overflow: clip on zero-sized elements.
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
1 parent 01c918e commit 1219311

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

intersection-observer/zero-area-element-visible.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414
width: 0px;
1515
height: 0px;
1616
}
17+
#container {
18+
overflow: clip;
19+
}
1720
</style>
1821

19-
<div id='target'></div>
22+
<div id="container">
23+
<div id='target'></div>
24+
</div>
2025

2126
<script>
2227
var entries = [];

0 commit comments

Comments
 (0)