Fix "undo" incorrectly undoing text input#247
Merged
huchenlei merged 1 commit intoComfy-Org:mainfrom Jul 28, 2024
Merged
Conversation
Fixes an issue where under certain conditions, the ComfyUI custom undo / redo functions would not run when intended to. When trying to undo an action like deleting several nodes, instead the native browser undo runs - e.g. a textarea gets focus and the last typed text is undone. Clicking outside the textarea and hitting ctrl + z again just keeps doing the same thing.
Contributor
|
Do we know what these repro conditions are? If we can consistently reproduce it, we should add a playwright test on it. |
Contributor
Author
|
I really wanted to offer you something more concrete when creating the PR, but... I still don't actually know. I think it has something to do with holding a modifier key whilst focusing in/out of boxes. It felt like a concurrency bug, so I went searching for async in the undo code. Sorry! |
Contributor
|
it's ok if we don't know. The change tracker file will eventually be removed anyway. Thanks for tracking this down! |
huchenlei
approved these changes
Jul 28, 2024
benceruleanlu
pushed a commit
that referenced
this pull request
Aug 3, 2025
* Remove arbitrary 5 graph unit margin around nodes * Remove arbitrary +1 pixel added to node width --------- Co-authored-by: Chenlei Hu <huchenlei@proton.me>
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.
Originally submitted here: Comfy-Org/ComfyUI#4114
Fixes an issue where under certain conditions, the ComfyUI custom undo / redo functions would not run when intended to.
When trying to undo an action like deleting several nodes, instead the native browser undo runs - e.g. a textarea gets focus and the last typed text is undone. Clicking outside the
textareaand hittingctrl + zagain just keeps doing the same thing.This could use a slight refactor, but I went with "minimal changes".