0

On mobile devices (or most devices with touch screens) it is possible to scroll via a fling. The scrolling then goes on (but decelerates), even when the user lifted his/her finger from the screen.

Is it possible to stop that additional scrolling with Javascript (jquery)?

janoliver
  • 7,744
  • 14
  • 60
  • 103
  • Do you want no scrolling at all or just for it to stop when you lift your finger? – lucusp Jan 24 '15 at 16:02
  • I actually have a button to immediately scroll to the end of the page, by executing `$('html, body').scrollTop( $(document).height() );`. However, the button does not work when the page is scrolling, which is why I want to cancel that first. – janoliver Jan 24 '15 at 16:08
  • have you prevented the default? Something like with `touchend` use `event.preventDefault();`? – lucusp Jan 24 '15 at 16:28
  • No, I haven't. The user should be able to scroll, I only would like to cancel that running scroll event at some point. – janoliver Jan 24 '15 at 16:30
  • This might help http://stackoverflow.com/questions/24303371/touchscreen-scroll-disable – lucusp Jan 24 '15 at 17:02
  • This does only prevent new touches from scrolling but does not cancel running scrolls. – janoliver Jan 24 '15 at 17:04
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/69510/discussion-between-lucusp-and-janoliver). – lucusp Jan 24 '15 at 17:05
  • have you found a way? – esskar Jun 28 '18 at 06:45

0 Answers0