Fix #396: Right-click Duplicate Node does nothing#409
Open
ErnestHysa wants to merge 2 commits into
Open
Conversation
added 2 commits
May 31, 2026 14:21
Replace deprecated api-inference.huggingface.co/models/ endpoint with api-inference.huggingface.co/inference-endpoint/ to resolve 410 Gone errors.
The right-click Duplicate Node action failed on some systems (e.g., Windows 11 LTSC) due to a race condition where Mantine's useClickOutside handler would close the menu on mousedown before the item click handler could execute. The fix closes the context menu explicitly in the onClick handler BEFORE calling the action handler. This ensures proper event ordering on all systems. Also applied the same fix to 'Favorite Node' and 'Delete Node' menu items for consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #396: Right-click Duplicate Node does nothing
Problem
The right-click Duplicate Node action failed on some systems (e.g., Windows 11 LTSC) due to a race condition where Mantine'''s useClickOutside handler closes the menu on mousedown before the item click handler can execute.
Root Cause
In the Mantine Menu component, when a user clicks on a Menu.Item, the useClickOutside hook fires on mousedown and closes the dropdown before the item'''s onClick handler fires. On most systems this race condition does not manifest, but on some (like Windows 11 LTSC), the event ordering causes the click handler to never execute.
Solution
Close the context menu explicitly in the onClick handler BEFORE calling the action handler. This ensures proper event ordering on all systems.
Changes
Testing