Issue metadata
Sign in to add a comment
|
Intersection Observer behaving incorrectly
Reported by
prashpa...@gmail.com,
Apr 27 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: 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
,
Apr 27 2017
,
Apr 27 2017
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.
,
Apr 27 2017
Allright great! That works! |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kavvaru@chromium.org
, Apr 27 2017