On Safari 10, by defining a simple listener that prevents default a touchmove
event within a scrollable element, the event is not default prevented as it does with Safari 9 and less (it also does in all major browsers).
This is reproducible here: http://codepen.io/anon/pen/PGRxOv
Steps to Reproduce:
- Take an element with scrollable content (overflow: scroll).
- Add an event listener on it for
touchmouve
event, and callevent.preventDefault()
in that event listener.
Expected Results:
The element should not be scrollable.
Actual Results:
The element is still scrollable on Safari 10.
Version: iOS 10.0.2
Probably a webkit issue...I opened an issue on webkit bug tracker.
In the mean time, if anyone has a workaround (except prevent the touchstart
), it would be great :)
I also tried to return false
in the listener but it does not work either.