Closed GameKyuubi closed 2 years ago
Have you already tried setting the POLL_INTERVAL as documented in https://github.com/w3c/IntersectionObserver/tree/master/polyfill#configuring-the-polyfill
display
property changes aren't efficiently discoverable in the polyfill, so you'll need to turn on the polling manually.
Is this on Safari or iOS WebView? I've heard several reports of bugs on iOS WebView, and I wouldn't be surprised if this isn't one of them.
Also, can you check to see if this is a problem on the latest iOS (which should support IntersectionObserver
natively now)?
Yeah I've noticed this issue as well! The images don't come up when their parent element becomes visible on iOS with the polyfill.
Is this on Safari or iOS WebView? I've heard several reports of bugs on iOS WebView, and I wouldn't be surprised if this isn't one of them.
Also, can you check to see if this is a problem on the latest iOS (which should support
IntersectionObserver
natively now)?
Given the lack of activity here, let's close as incomplete.
If others are running into this issue w/ the native implementation provided by iOS (webview or Safari), I would recommend filing a bug against https://bugs.webkit.org/
When using code like this,
IntersectionObserver
will not report the change fromdisplay:none
todisplay:block
on iOS. In my case I am usinglozad.js
on both image elements. The thumbnail is loaded properly using lozad.js, but when clicked the lightbox is not. Upon scrolling a bit, the change is detected and the image is loaded. The workaround is to set a polling interval as specified here, but optimally this shouldn't be necessary as the documentation says changes in the DOM are supposed to be detected.