Skip to content

Commit 1984c80

Browse files
committed
Use nodeName of event.target for preventDefault
instead of checking the nodeName of the Interactable's element
1 parent 6913959 commit 1984c80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interact.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3093,7 +3093,7 @@
30933093
var options = interactable.options,
30943094
prevent = options.preventDefault;
30953095

3096-
if (prevent === 'auto' && element && !/^(input|select|textarea)$/i.test(element.nodeName)) {
3096+
if (prevent === 'auto' && element && !/^(input|select|textarea)$/i.test(event.target.nodeName)) {
30973097
// do not preventDefault on pointerdown if the prepared action is a drag
30983098
// and dragging can only start from a certain direction - this allows
30993099
// a touch to pan the viewport if a drag isn't in the right direction

0 commit comments

Comments
 (0)