Skip to content

Commit 8bc1c99

Browse files
committed
fix(core): disable drag when using multi-touch (#1448)
* fix(core): disable drag when using multi-touch * chore(changeset): add
1 parent 1b5e14a commit 8bc1c99

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/selfish-vans-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": patch
3+
---
4+
5+
Disable dragging when using multi-touch

packages/core/src/composables/useDrag.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ export function useDrag(params: UseDragParams) {
185185
}
186186

187187
const eventStart = (event: UseDragEvent, nodeEl: Element) => {
188+
if (event.sourceEvent.type === 'touchmove' && event.sourceEvent.touches.length > 1) {
189+
return
190+
}
191+
188192
if (nodeDragThreshold.value === 0) {
189193
startDrag(event, nodeEl)
190194
}

0 commit comments

Comments
 (0)