mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
Fix: Fix undo/redo while action menu is open (#6273)
* Add data attribute to modals for testing * Add test for undoing with action menu open not destroying text * Add test for undo closing the action menu * Add simple fix for undo/redo with action menu open Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
[e]
|
||||
(util/stop e)
|
||||
(state/set-editor-op! :undo)
|
||||
(state/clear-editor-action!)
|
||||
(editor/save-current-block!)
|
||||
(let [{:keys [editor-cursor]} (undo-redo/undo)]
|
||||
(restore-cursor! editor-cursor))
|
||||
@@ -30,6 +31,7 @@
|
||||
[e]
|
||||
(util/stop e)
|
||||
(state/set-editor-op! :redo)
|
||||
(state/clear-editor-action!)
|
||||
(let [{:keys [editor-cursor]} (undo-redo/redo)]
|
||||
(restore-cursor! editor-cursor))
|
||||
(state/set-editor-op! nil))
|
||||
|
||||
Reference in New Issue
Block a user