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
Inconsistent undo/redo behavior in Ctrl-F field #27035
Comments
@obskyr I do occasionally run into this kind of issue when using the input box in Search Viewlet but I don't have a good repro. can you provide a gif to help troubleshoot? |
@rebornix Sure! Here you go: In this GIF, I:
Also see this related buggy behavior: In this GIF, I:
|
@obskyr I really appreciate your gif and reproduce steps :) |
It's likely a browser issue as https://w3c.github.io/editing/execCommand.html#introduction is in draft and you can see weird behavior when playing Monaco Find Widget in Chromium but it's kind of good in Firefox. |
@rebornix, @alexandrudima this bug seems to still exist and is super annoying. Is there a particular upstream project which we need to forward this issue to? monaco-editor? Also, I'd like to add that it'd be great if the find and replace fields had separate undo stacks, like Atom has. However, such support isn't useful until this issue is fixed. |
Now that we are using the shared history enabled input box, maybe we can improve the experience. |
@rebornix Can you please elaborate what improvements you are expecting with history here? |
Ping @rebornix ☝️ |
@sandy081 I found that
|
I do not think cm+z is an history feature. Not sure who owns this. Sorry. |
this seems to be fixed now |
Steps to Reproduce:
Characters will be deleted and added almost at random, based on the field's state before the contents were replaced in step 4. This seems to be because the undo/redo history stores characters being entered and deleted, but the replacement of the entire field contents is not stored on the field's history stack. If it were, an undo would simply revert the Ctrl-F field to its earlier state.
Other fields may have the same problem - the basic issue here is that an operation isn't being pushed to the history stack.
The text was updated successfully, but these errors were encountered: