New issue
Advanced search Search tips

Issue 715995 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Intersection Observer behaving incorrectly

Reported by prashpa...@gmail.com, Apr 27 2017

Issue description

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

Steps to reproduce the problem:
1. Go to https://cdn.rawgit.com/prashantpalikhe/intersection-observer-lazy-loading/c7becb02/index.html
2. Scroll down
3. Images are already loaded

What is the expected behavior?
Images below the fold are observing intersection with viewport using Intersection Observer. And only when the images are within the viewport, the data-src attribute is changed to src, therefore loading the images only when the user scrolls.

What went wrong?
All the observer change callbacks are fired immediately and all images are loaded before scrolling.

Did this work before? Yes 57

Does this work in other browsers? Yes

Chrome version: 58.0.3029.81  Channel: stable
OS Version: OS X 10.12.4
Flash Version: Shockwave Flash 25.0 r0
 
Labels: Prestable-58.0.3029.81 Needs-Triage-M58 Needs-Bisect

Comment 2 Deleted

Comment 3 by rbyers@chromium.org, Apr 27 2017

Cc: szager@chromium.org
Components: Blink>Layout

Comment 4 by szager@chromium.org, Apr 27 2017

Status: WontFix (was: Unconfirmed)
This is working as intended; starting in M58, an initial notification is delivered for every call to observe(), whether the target is intersecting or not.

https://github.com/WICG/IntersectionObserver/issues/165

You'll have to check the isIntersecting field of the notification.
Allright great! That works!

Sign in to add a comment