Copy/Paste/Undo/Redo Keyboard Shortcuts are not working within WebViewsMarch 17, 2020 at 1:46pm (Edited 2 years ago)
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:
- CMD/Ctrl-C : the selection is not copied to the clipboard
- CMD/Ctrl-V : the content of the clipboard is pasted, with what was copied from an external app
- CMD/Ctrl-Z : Undo is NOT working in e.g. an input or textarea field.
- CMD/Ctrl-Shift-Z : Redo is NOT working in e.g. an input or textarea field.
- 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?
March 17, 2020 at 1:50pm
Theia does not prevent any shortcuts in webviews. Someone needs to investigate what is really going on.
March 17, 2020 at 8:53pm