There is a closed issue #27 considering probably same case (@ilkome did not specify whether he did it programatically). I am not sure if my message would be seen there since it is closed, sorry if I'm not doing it right.
Tested on MacOS Sierra, Google Chrome Version 70.0.3538.110
The text was updated successfully, but these errors were encountered:
Try to scroll down manually a bit and then click the button - you will see that both scroll and callback indeed can and do happen.
This GIF should illustrate the issue: callbacks not fired when no scroll occurred.
UPD: Thank you, I can now see, that it indeed happens only when body is targeted, still not sure that it is the intended behaviour.
It think this is still an issue when not targeting body. If no scroll is needed, the onDone callback should fire. Otherwise, consuming libraries have no idea if they can proceed to their next "action".
In our specific use case, we're promisify-ing this library through a mixin, and in the case that an element is in the viewport, the promise will never resolve, unless we implement the same logic for checking vieport presence: