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 text area and typing again just keeps doing the same thing.