improve prev hack

This commit is contained in:
Sam 2018-04-30 16:20:41 +10:00 committed by Régis Hanol
parent 2e0189afe9
commit 3fee06ae59

View File

@ -68,16 +68,10 @@ function cancelDrag(e, onDrag) {
WidgetClickHook.setupDocumentCallback = function() {
if (_watchingDocument) { return; }
document.addEventListener('touchmove', e => {
e.preventDefault();
e.stopPropagation();
}, { passive: false, capture: true });
let widget;
let onDrag = dragE => {
const tt = dragE.targetTouches[0];
if (tt) {
if (tt && widget) {
dragE.preventDefault();
dragE.stopPropagation();
widget.drag(tt);