Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fix undo/redo while action menu is open #6273

Merged
merged 5 commits into from Aug 15, 2022

Conversation

phoenixeliot
Copy link
Contributor

@phoenixeliot phoenixeliot commented Aug 4, 2022

This applies a minimal fix for #6267 and #6269.

I think it's a good change on its own, but there are potentially other changes to make to fully fix buggy behavior around how the editor never saves while the action menu is open; see #6267 (comment) for more on that.

Changes in this PR:

  • Adds automated test; I had to add a data class to the modal to be able to check for it with the tests. (The data attribute code is the same as in Feat: Press escape to close action menu #6270)
  • Clear the current editor action before performing an undo or redo. For undo, this allows the editor to save the way it normally tries to before undoing (so that the changes are redoable). For redo, it's a little unclear to me on why this causes redo history to be correct (if you make an edit in a [[]] it should replace the redo stack), but it does, and causes correct behavior.

@phoenixeliot
Copy link
Contributor Author

I'm going to mark this ready for review in case y'all think it's mergable, though it does still feel like it's pending some discussion at #6267 (comment) as mentioned above.

@phoenixeliot phoenixeliot marked this pull request as ready for review August 4, 2022 17:18
@phoenixeliot phoenixeliot changed the title Fix undo/redo while action menu is open Fix: Fix undo/redo while action menu is open Aug 4, 2022
@cnrpman cnrpman requested review from tiensonqin, andelf, xyhp915 and cnrpman and removed request for tiensonqin and andelf August 6, 2022 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants