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 <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
5
.changeset/honest-deers-thank.md
Normal file
5
.changeset/honest-deers-thank.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vue-flow/core": patch
|
||||
---
|
||||
|
||||
Only capture pointer when a valid selection has started
|
||||
@@ -115,7 +115,6 @@ function onWheel(event: WheelEvent) {
|
||||
|
||||
function onPointerDown(event: PointerEvent) {
|
||||
containerBounds.value = vueFlowRef.value?.getBoundingClientRect()
|
||||
;(event.target as Element)?.setPointerCapture?.(event.pointerId)
|
||||
|
||||
if (
|
||||
!elementsSelectable.value ||
|
||||
@@ -127,6 +126,8 @@ function onPointerDown(event: PointerEvent) {
|
||||
return
|
||||
}
|
||||
|
||||
;(event.target as Element)?.setPointerCapture?.(event.pointerId)
|
||||
|
||||
const { x, y } = getMousePosition(event, containerBounds.value)
|
||||
|
||||
selectionStarted = true
|
||||
|
||||
Reference in New Issue
Block a user