Commit 431fe33
fix: preserve node selection on right-click (#7162)
Previously, right-clicking on a Vue node would deselect all other
selected nodes because the pointerup event handler was calling
toggleNodeSelectionAfterPointerUp regardless of which mouse button was
released.
This fix skips selection handling when the right mouse button (button 2)
is released, allowing the context menu to operate on the existing
selection.
## Summary
- Fixes right-click deselecting all selected nodes when using Vue node
rendering
- Now right-clicking preserves the existing selection, allowing context
menu
actions on multiple nodes
## Problem
When multiple nodes were selected and user right-clicked on one of them,
the
`pointerup` event handler would call
`toggleNodeSelectionAfterPointerUp`, which
deselected everything except the clicked node. This broke multi-node
context menu
operations.
## Solution
Skip selection handling in `onPointerup` when `event.button === 2`
(right-click).
The context menu handler manages selection independently
fix #7136
Before
https://github.com/user-attachments/assets/23ac5e03-c464-44b7-8950-67c14da9e02b
After
https://github.com/user-attachments/assets/9d1bd6a8-6386-442b-9dc4-6bc8fbe4a0a8
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7162-fix-preserve-node-selection-on-right-click-2bf6d73d365081acaf75f2fc845bbffb)
by [Unito](https://www.unito.io)
---------
Co-authored-by: GitHub Action <[email protected]>1 parent 5233749 commit 431fe33
File tree
1 file changed
+4
-0
lines changed- src/renderer/extensions/vueNodes/composables
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
0 commit comments