Skip to content

Commit

Permalink
Fix IntersectionObserverEntry.isIntersecting to match other browsers.
Browse files Browse the repository at this point in the history
Note that no browser matches the spec (see
w3c/IntersectionObserver#432), but that our
behavior is reasonably close to them. So do this to match them.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1611204
gecko-commit: 0dba6079675375c8934301b57a284a0988804441
gecko-integration-branch: autoland
gecko-reviewers: mstange
  • Loading branch information
emilio authored and moz-wptsync-bot committed May 28, 2020
1 parent 179d291 commit f0b51ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion intersection-observer/isIntersecting-threshold.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@

assert_equals(entries.length, 1);
assert_equals(entries[0].intersectionRatio, 1);
assert_equals(entries[0].isIntersecting, true);
// See https://github.com/w3c/IntersectionObserver/issues/432
assert_equals(entries[0].isIntersecting, false);
scroller.scrollTop = 50;
}

Expand Down

0 comments on commit f0b51ad

Please sign in to comment.