From 56ab0f2b5d7f5bd35ed6252749cfa1867c3b0f6a Mon Sep 17 00:00:00 2001 From: perry Date: Wed, 20 May 2015 11:12:56 -0500 Subject: [PATCH] fix(gesture): only preventDefault on direction if direction supplied --- js/utils/gestures.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/utils/gestures.js b/js/utils/gestures.js index 17caa028c83..d7588147e9e 100644 --- a/js/utils/gestures.js +++ b/js/utils/gestures.js @@ -1170,7 +1170,9 @@ this.preventedFirstMove = false; } else if (!this.preventedFirstMove && ev.srcEvent.type == 'touchmove') { - if (inst.options.prevent_default_directions.indexOf(ev.direction) != -1) { + // Prevent gestures that are not intended for this event handler from firing subsequent times + if (inst.options.prevent_default_directions.length === 0 + || inst.options.prevent_default_directions.indexOf(ev.direction) != -1) { ev.srcEvent.preventDefault(); } this.preventedFirstMove = true;