Skip to content

fix: stop right-click bubbling to node context menu in Nodes 2.0#137

Open
jtydhr88 wants to merge 1 commit into
PozzettiAndrea:mainfrom
jtydhr88:fix/vue-nodes-contextmenu-bubble
Open

fix: stop right-click bubbling to node context menu in Nodes 2.0#137
jtydhr88 wants to merge 1 commit into
PozzettiAndrea:mainfrom
jtydhr88:fix/vue-nodes-contextmenu-bubble

Conversation

@jtydhr88
Copy link
Copy Markdown

The canvas contextmenu listeners in the Point/BBox/MultiRegion/ Interactive collectors called e.preventDefault() but not e.stopPropagation(). Under LiteGraph this was sufficient because the DOM widget canvas absorbed the event. Under Nodes 2.0 (vueNodes) the event bubbles to NodeWidgets.vue's @contextmenu handler, which opens the node's context menu and blocks negative-point/bbox interaction.
image

Adding stopPropagation keeps the right-click confined to the canvas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant