diff --git a/src/standard/gestures.html b/src/standard/gestures.html
index 052a40d042..3caefbea48 100644
--- a/src/standard/gestures.html
+++ b/src/standard/gestures.html
@@ -28,7 +28,7 @@
// but this breaks `` focus and link clicks
// disable mouse handlers for MOUSE_TIMEOUT ms after
// a touchend to ignore synthetic mouse events
- var MOUSE_CANCELLER = function(mouseEvent) {
+ var mouseCanceller = function(mouseEvent) {
mouseEvent[HANDLED_OBJ] = {skip: true};
// disable "ghost clicks"
if (mouseEvent.type === 'click') {
@@ -43,18 +43,18 @@
}
};
- function IGNORE_MOUSE(set) {
+ function ignoreMouse(set) {
for (var i = 0, en; i < MOUSE_EVENTS.length; i++) {
en = MOUSE_EVENTS[i];
if (set) {
- document.addEventListener(en, MOUSE_CANCELLER, true);
+ document.addEventListener(en, mouseCanceller, true);
} else {
- document.removeEventListener(en, MOUSE_CANCELLER, true);
+ document.removeEventListener(en, mouseCanceller, true);
}
}
if (set) {
// disable MOUSE_CANCELLER after MOUSE_TIMEOUT ms
- setTimeout(IGNORE_MOUSE, MOUSE_TIMEOUT);
+ setTimeout(ignoreMouse, MOUSE_TIMEOUT);
} else {
POINTERSTATE.mouse.target = null;
}
@@ -88,6 +88,7 @@
function deepTargetFind(x, y) {
var node = document.elementFromPoint(x, y);
+ // this code path is only taken when native ShadowDOM is used
var next = node.shadowRoot;
while(next) {
next = next.elementFromPoint(x, y);
@@ -149,7 +150,7 @@
// ignore syntethic mouse events after a touch
if (type === 'touchend') {
POINTERSTATE.touch.id = -1;
- IGNORE_MOUSE(true);
+ ignoreMouse(true);
}
},
@@ -203,8 +204,8 @@
gd[name] = (gd[name] || 0) + 1;
}
node.addEventListener(evType, handler);
- if (recognizer.touchaction) {
- this.setTouchAction(node, recognizer.touchaction);
+ if (recognizer.touchAction) {
+ this.setTouchAction(node, recognizer.touchAction);
}
},
@@ -266,7 +267,7 @@
Gestures.register({
name: 'track',
- touchaction: 'none',
+ touchAction: 'none',
deps: ['mousedown', 'touchmove', 'touchend'],
emits: ['track'],