mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 01:50:08 +00:00
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 https://github.com/Comfy-Org/ComfyUI_frontend/issues/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 <action@github.com>