From ecb8eb0263dfe4eea08c86d57cedb18565f2871e Mon Sep 17 00:00:00 2001 From: cyrille Date: Wed, 21 Jun 2017 09:17:58 +0200 Subject: [PATCH] test if path exist with ghost clicks events --- src/standard/gestures.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/standard/gestures.html b/src/standard/gestures.html index 63c9a9cdbb..9d32904b06 100644 --- a/src/standard/gestures.html +++ b/src/standard/gestures.html @@ -71,9 +71,11 @@ // disable "ghost clicks" if (mouseEvent.type === 'click') { var path = Polymer.dom(mouseEvent).path; - for (var i = 0; i < path.length; i++) { - if (path[i] === POINTERSTATE.mouse.target) { - return; + if (path) { + for (var i = 0; i < path.length; i++) { + if (path[i] === POINTERSTATE.mouse.target) { + return; + } } } mouseEvent.preventDefault();