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
Undo of cell creation loses Notebook focus #99151
Comments
The root cause is hat the cell creation undo leads to the focused editor being disposed, which leads to the focus going to the body (and leaving the notebook). Once clicking anywhere inside the notebook, undo works again. |
Now that the cells and notebook list share the same undo/redo stack, the issue should be gone now. |
I'm still seeing this in today's insiders |
@RMacfarlane are you still seeing this in Insiders now? |
Pushed a fix which fixes this issue partially. |
This happens when focus is in the editor, and when we delete the focused dom element, focus doesn't get reset to the list. We can't anything specifically for 'undo' because it happens in the model, but really we want to prevent this from happening for any cell modification. So I pushed a change to ensure that no list splice causes the list to lose DOM focus. Please take a look at the change @rebornix to check that this makes sense. |
Issue Type: Bug
Testing #98991
.github-issues
file and type in the first cellThe text from the new cell is removed, then the new cell itself, then undo stops working. I expected undo to remove text from the first cell at that point. If I focus the first cell and try to undo again, it does work.
VS Code version: Code - Insiders 1.46.0-insider (1bfa086, 2020-06-02T08:10:00.819Z)
OS version: Darwin x64 18.7.0
The text was updated successfully, but these errors were encountered: