diff --git a/src/swipe/index.js b/src/swipe/index.js index 401db97cd..01b841964 100644 --- a/src/swipe/index.js +++ b/src/swipe/index.js @@ -210,8 +210,16 @@ export default createComponent({ this.touchMove(event); - if (this.isCorrectDirection) { + // if user starting to touchmove, prevent the event bubbling to + // avoid affecting the parent components + const shouldPrevent = + this.isCorrectDirection || + this.offsetY > this.offsetX === this.vertical; + if (shouldPrevent) { preventDefault(event, this.stopPropagation); + } + + if (this.isCorrectDirection) { this.move({ offset: this.delta }); } },