Copy/Paste/Undo/Redo Keyboard Shortcuts are not working within WebViews

The following behaviour is observed in Google Chrome (version 80).

Within Webviews in Theia, we have noticed that the following keyboard shortcuts are not working as expected:

  1. CMD/Ctrl-C : the selection is not copied to the clipboard

  2. CMD/Ctrl-V : the content of the clipboard is pasted, with what was copied from an external app

  3. CMD/Ctrl-Z : Undo is NOT working in e.g. an input or textarea field.

  4. CMD/Ctrl-Shift-Z : Redo is NOT working in e.g. an input or textarea field.

Also noticed:

  • Using the Paste option from the edit menu gives the following warning message: Please use the browser’s paste command or shortcut.

  • Other keyboard shortcuts like CMD/Ctrl+B, and CMD/Ctrl+I are working fine within contenteditable blocks.

Now, if we open up the Chrome devTools, then reload the webview with devTools open, all of the above commands start working as expected.

We observed that once devTools are open, these keyboard shortcuts are handled by the browser natively.
When devTools are closed, it seems that these keyboard shortcuts are being swallowed by Theia.

We’d like to understand why and how Theia is taking control of these keyboard shortcuts?
Could you provide please some guidance on how we could override this behaviour?

[original thread by Christopher Morris]

It sounds like a bug, please file an issue.

Theia does not prevent any shortcuts in webviews. Someone needs to investigate what is really going on.

[Christopher Morris]

Thanks, entered a bug here: