mlisook / plastic-image

A Polymer 3.0 element which adds extra plasticity to <iron-image> with support for srcset and lazy loading
MIT License
30 stars 6 forks source link

Firefox Loss of Intersection Observer #22

Closed mlisook closed 7 years ago

mlisook commented 7 years ago

In Firefox, the disconnectedCallback is called twice. This causes the counter of observed elements to go to zero (or below!) when some elements are still being observed. The observer is then deleted by the element. Now the observations don't happen and don't trigger lazy loading.

This can be seen / triggered with a little patience while switching pages back and forth in a PWA or any SPA, or even by changing the array bound to a dom-repeat that is rendering a list of plastic-images. It's hit/miss, but it does happen.

Update forthcoming.

mlisook commented 7 years ago

Closed by PR #24