I have a scrollable html element, which is wider than screen. And there is mini scroll map to show scroll position.
On touch devices, when user makes a swipe move and then ends the touch, element continues scrolling for some time. How can I detect this scrolling with javascript to renew mini-scroll map?
I dont know of any native browser API that tells you the end of a scroll event. In our project we found a workaround that fits for all our usecases:
You can listen for the scroll event and detect the end of the scrolling by a timeout timer.
To debug (in chrome) press F12 and press "Toggle device toolbar" or press the shortcut within the console "Ctrl + Shift + M". This enters mobile mode and you can scroll.