ios: always preventDefault on touchstart to avoid emulated mousedown (#356)

This commit is contained in:
jean-emmanuel 2018-09-01 09:36:45 +02:00
parent 00cbce9fff
commit ac9dd771b3

View file

@ -5,6 +5,7 @@ if (navigator.platform.match(/iPhone|iPod|iPad/)) {
var preventNextMove = false
document.addEventListener('touchstart', (e)=>{
e.preventDefault()
if (e.touches.length === 1 && !e.target._drag_widget) preventNextMove = (window.pageYOffset === 0)
}, false)