From 1984c805689ec44b9c525a3fc7b6b7253140d583 Mon Sep 17 00:00:00 2001 From: Taye Adeyemi Date: Sat, 16 May 2015 17:05:44 +0100 Subject: [PATCH] Use nodeName of event.target for preventDefault instead of checking the nodeName of the Interactable's element --- interact.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interact.js b/interact.js index d1f352576..fb9c44f8f 100644 --- a/interact.js +++ b/interact.js @@ -3093,7 +3093,7 @@ var options = interactable.options, prevent = options.preventDefault; - if (prevent === 'auto' && element && !/^(input|select|textarea)$/i.test(element.nodeName)) { + if (prevent === 'auto' && element && !/^(input|select|textarea)$/i.test(event.target.nodeName)) { // do not preventDefault on pointerdown if the prepared action is a drag // and dragging can only start from a certain direction - this allows // a touch to pan the viewport if a drag isn't in the right direction