From 24b3a05c76b047895ab1529986a7a36814dcf6bc Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 3 Aug 2019 21:28:26 +0800 Subject: [PATCH] [improvement] Picker: stop propagation when touchmove in vertical direction (#4043) --- src/picker/PickerColumn.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/picker/PickerColumn.js b/src/picker/PickerColumn.js index 1c18d4533..76ecb91d9 100644 --- a/src/picker/PickerColumn.js +++ b/src/picker/PickerColumn.js @@ -98,9 +98,13 @@ export default createComponent({ }, onTouchMove(event) { - preventDefault(event); this.moving = true; this.touchMove(event); + + if (this.direction === 'vertical') { + preventDefault(event, true); + } + this.offset = range( this.startOffset + this.deltaY, -(this.count * this.itemHeight),