Skip to content

Fix undo/redo broken in non-editor webviews#89961

Merged
mjbvz merged 1 commit intomicrosoft:masterfrom
facebookexperimental:fix-webview-undo
Feb 3, 2020
Merged

Fix undo/redo broken in non-editor webviews#89961
mjbvz merged 1 commit intomicrosoft:masterfrom
facebookexperimental:fix-webview-undo

Conversation

@evangrayk
Copy link
Contributor

This PR fixes #89960

Undo/redo is broken in webviews due to the context key being overly aggressive in setting itself as webviewHasOwnEditFunctions. I think instead of true, this should set it to be based on if it has a custom editor. This fixes webviewCommands.ts, which uses this context key for undo/redo.

Repro:

  1. open a webview with an <input> (e.g. modify the cat coding sample)
  2. type into the input
  3. undo & redo with cmd-z and cmd-shift-z work as expected

@mjbvz mjbvz added this to the February 2020 milestone Feb 3, 2020
@mjbvz mjbvz merged commit 0556732 into microsoft:master Feb 3, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 3, 2020

Thanks!

@evangrayk evangrayk deleted the fix-webview-undo branch February 3, 2020 23:16
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't undo in non-editor webviews

2 participants