Skip to content

Commit a8d837b

Browse files
committed
fix(core): only capture pointer if valid selection has started (#1565)
* fix(core): only capture pointer if valid selection has started Signed-off-by: braks <[email protected]> * chore(changeset): add Signed-off-by: braks <[email protected]> --------- Signed-off-by: braks <[email protected]>
1 parent e62cc27 commit a8d837b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/honest-deers-thank.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+
Only capture pointer when a valid selection has started

packages/core/src/container/Pane/Pane.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ function onWheel(event: WheelEvent) {
115115
116116
function onPointerDown(event: PointerEvent) {
117117
containerBounds.value = vueFlowRef.value?.getBoundingClientRect()
118-
;(event.target as Element)?.setPointerCapture?.(event.pointerId)
119118
120119
if (
121120
!elementsSelectable.value ||
@@ -127,6 +126,8 @@ function onPointerDown(event: PointerEvent) {
127126
return
128127
}
129128
129+
;(event.target as Element)?.setPointerCapture?.(event.pointerId)
130+
130131
const { x, y } = getMousePosition(event, containerBounds.value)
131132
132133
selectionStarted = true

0 commit comments

Comments
 (0)