Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pinch zoom triggers long press event
Browse files Browse the repository at this point in the history
binbin authored and binbin committed Aug 21, 2023

Verified

This commit was signed with the committer’s verified signature.
Julesssss Jules
1 parent cef0d36 commit 3eeb7c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/varlet-ui/src/image-preview/ImagePreview.vue
Original file line number Diff line number Diff line change
@@ -219,9 +219,10 @@ export default defineComponent({
startTouch = currentTouch
longPressRunner = window.setTimeout(() => {
const { onLongPress } = props
isLongPress = true
call(onLongPress, idx)
if (event.touches.length === 1) {
call(props.onLongPress, idx)
}
}, LONG_PRESS_DELAY)
if (isDoubleTouch(currentTouch)) {

0 comments on commit 3eeb7c3

Please sign in to comment.