events: interaction issue ("deadzone") on touch screens
This commit is contained in:
parent
b6ea4e7d9f
commit
8a5cfa459d
2 changed files with 8 additions and 2 deletions
|
|
@ -233,7 +233,6 @@ DOM.ready(()=>{
|
|||
document.addEventListener('touchmove', touchMoveCapture, true)
|
||||
DOM.addEventListener(document, 'touchend touchcancel', touchUpCapture, true)
|
||||
|
||||
document.addEventListener('touchstart', touchDownCapture, false)
|
||||
if (!iOS) document.addEventListener('pointerdown', mouseDownCapture)
|
||||
|
||||
})
|
||||
|
|
@ -254,6 +253,7 @@ module.exports = {
|
|||
var {element, multitouch} = options
|
||||
|
||||
element.style.touchAction = 'none'
|
||||
element.addEventListener('touchstart', touchDownCapture, false)
|
||||
element._drag_widget = this
|
||||
element._drag_multitouch = multitouch
|
||||
|
||||
|
|
@ -273,6 +273,7 @@ module.exports = {
|
|||
var {element} = options
|
||||
|
||||
element.style.touchAction = ''
|
||||
element.removeEventListener('touchstart', touchDownCapture, false)
|
||||
delete element._drag_widget
|
||||
delete element._drag_multitouch
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue