[Webkit-unassigned] [Bug 212303] New: [IntersectionObserver] Wrong isIntersecting value when thresholds are involved

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 23 09:54:11 PDT 2020


            Bug ID: 212303
           Summary: [IntersectionObserver] Wrong isIntersecting value when
                    thresholds are involved
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: emilio at crisal.io
                CC: koivisto at iki.fi, rwlbuis at gmail.com

What steps will reproduce the problem?
1. Open https://bugzilla.mozilla.org/attachment.cgi?id=9151272. Note that the expectation of that test-case is wrong.
2. Scroll down until the element is fully in view. Yo should see "true, 1.0" in the console.
3. Scroll back up until the element is no longer fully in view. You should see "true, <some number less than one>", but you get "false, <some number less than one>" instead.

Per the spec, isIntersecting in that second notification should be true:


> Let isIntersecting be true if targetRect and rootBounds intersect or are edge-adjacent, even if the intersection has zero area (because rootBounds or targetRect have zero area); otherwise, let isIntersecting be false.

Chromium and WebKit seem to use `isIntersecting = thresholdIndex > 0` or something of that sort.


I think Firefox is right per spec on this one unless I'm missing something.

I filed https://bugs.chromium.org/p/chromium/issues/detail?id=1085938 for Chrome.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200523/a2dea2c0/attachment.htm>

More information about the webkit-unassigned mailing list