zenscroll icon indicating copy to clipboard operation
zenscroll copied to clipboard

Issue in stopScroll timeout

Open pat-flew opened this issue 5 years ago • 0 comments

I stumbled on an issue where the scroller will stop scrolling midway during a scroll. This would happen occasionally if the user was calling scrollToY repeatedly. I haven't checked other cases.

This line was the cause of the issue:

setTimeout(stopScroll, 99) // with cooldown time

The timeout in some cases did not fire until after another scroll had been started.

I was able to address by saving the timeout id and clearing if set at the start of scrollToY

pat-flew avatar Feb 26 '20 21:02 pat-flew