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: 867528d1d35bdec48758f8aa899b0491d7ef10e5
gecko-integration-branch: autoland
gecko-reviewers: mstange
  • Loading branch information
emilio authored and moz-wptsync-bot committed May 28, 2020
1 parent ffd5294 commit fe8878e
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 @@ -43,7 +43,8 @@
assert_equals(entries.length, 2);
assert_true(entries[1].intersectionRatio >= 0.5 &&
entries[1].intersectionRatio < 1);
assert_equals(entries[1].isIntersecting, true);
// See https://github.com/w3c/IntersectionObserver/issues/432
assert_equals(entries[1].isIntersecting, false);
scroller.scrollTop = 100;
}

Expand Down

0 comments on commit fe8878e

Please sign in to comment.