Scroll event handler should not be detached in render method.
ladjzero opened this issue · comments
Zhuo Chen commented
I'm working on such case, rendering item views of a listview asynchronously. echo
was initialized as soon as DOMContentLoaded, and then item views were rendered one by one.
It turns out that scroll event handler may be detached if length of document.querySelectorAll('img[data-echo], [data-echo-background]')
is 0.
It would be better that the scroll event handler was kept as it is. Because the nodes
in the method render is not cached at all. Every time the render method is called, the nodes
can be updated. While nodes.length > 0
, scroll handler can be called.
Zhuo Chen commented
I use the release 1.7.3