New issue
Advanced search Search tips

Issue 722116 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Intersection Observer API - wrong value of IntersectionObserverEntry.isIntersecting

Reported by stefanju...@gmail.com, May 14 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. Open index.html in Chrome. It shows an implementation of the Intersection Observer API (https://wicg.github.io/IntersectionObserver/). The observer function will be called with a IntersectionObserverEntry which includes `isIntersecting` property. Whenever the target (
) get into the viewport the property isIntersecting is logged to the console.
2. Scroll up and down to see the value of isIntersecting in the console.

What is the expected behavior?
The value of the property should be true if it enters the viewport and false if it's leaving the viewport.

What went wrong?
Even when the callback is called properly on intersection the value of the property `isIntersecting` is only initially false but stays true afterwards.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 58.0.3029.110  Channel: stable
OS Version: OS X 10.12.0
Flash Version:
 
index.html
588 bytes View Download
try `console.log(entry.isIntersecting, entry.intersectionRatio)`, then you will find that the behavior is correct.


屏幕快照 2017-05-15 上午11.40.15.png
33.6 KB View Download
Labels: Needs-Triage-M58
 Issue 722114  has been merged into this issue.
Components: Platform>DevTools
Labels: -Needs-Triage-M58 M-60 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.12.4, Win-10 and Ubuntu 14.04 using chrome reported version #58.0.3029.110 and latest chrome version #60.0.3101.0.

This is a non-regression issue as it is observed from M52 old builds. In M52 builds, while scrolling up and down, the value doesn't remain false or true. Rather it shows as "undefined" and the count increases. plz refer the attached intersection@M52 screen shot.
In M50 builds, intersectionobserver is not defined.

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
intersection@M52.JPG
18.4 KB View Download
intersection@M50.JPG
22.5 KB View Download
Cc: ojan@chromium.org
Components: -Platform>DevTools
It's not related to Chrome DevTools, so forwarded.. 
Components: Blink>Layout

Comment 7 by e...@chromium.org, Sep 1 2017

Owner: szager@chromium.org
Status: Assigned (was: Untriaged)

Comment 8 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org

Sign in to add a comment