fix: stop undo propagation in mask editor and wire maskeditor_is_opended#10222
fix: stop undo propagation in mask editor and wire maskeditor_is_opended#10222Doomeriss wants to merge 3 commits intoComfy-Org:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds prevention of default/browser propagation for Ctrl/Cmd+Y and Ctrl/Cmd+Z in the mask editor keyboard handler, and exposes Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
🎭 Playwright: ⏳ Running... |

Summary
Fix Ctrl+Z in mask editor undoing the graph state and reverting pasted images in Load Image node.
Changes
event.stopPropagation()andevent.preventDefault()to Ctrl+Z/Y handlers inuseKeyboard.tsto prevent undo events from bubbling up to LiteGraph. Also wiredComfyApp.maskeditor_is_opendedto the existingisOpened()function inmaskeditor.tswhich was never assigned, causing the changeTracker to always run undo even when the mask editor was open.Review Focus
The
maskeditor_is_opendedstatic property was defined inapp.tsand checked inchangeTracker.tsbut never actually assigned inmaskeditor.tsduring the extension init. This meant the guard that prevents LiteGraph undo while the mask editor is open was effectively dead code.Screenshots (if applicable)
Steps to reproduce the fixed bug:
┆Issue is synchronized with this Notion page by Unito