fix(core): disable drag when using multi-touch (#1448)

* fix(core): disable drag when using multi-touch

* chore(changeset): add
This commit is contained in:
Braks
2024-06-05 20:19:41 +02:00
parent 1b5e14a5b8
commit 8bc1c99252
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/core": patch
---
Disable dragging when using multi-touch

View File

@@ -185,6 +185,10 @@ export function useDrag(params: UseDragParams) {
}
const eventStart = (event: UseDragEvent, nodeEl: Element) => {
if (event.sourceEvent.type === 'touchmove' && event.sourceEvent.touches.length > 1) {
return
}
if (nodeDragThreshold.value === 0) {
startDrag(event, nodeEl)
}