From e8d01de0606eb7fc5f73c6e1c896eea788f76197 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 31 Dec 2019 10:39:27 +0800 Subject: [PATCH] fix(Picker): compatible with desktop scenario (#5430) --- src/picker/PickerColumn.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/picker/PickerColumn.js b/src/picker/PickerColumn.js index 050526347..5f15298dd 100644 --- a/src/picker/PickerColumn.js +++ b/src/picker/PickerColumn.js @@ -140,9 +140,14 @@ export default createComponent({ } const index = this.getIndexByOffset(this.offset); - this.moving = false; this.duration = DEFAULT_DURATION; this.setIndex(index, true); + + // compatible with desktop scenario + // use setTimeout to skip the click event triggered after touchstart + setTimeout(() => { + this.moving = false; + }, 0); }, onTransitionEnd() {