-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
widgets input can't undo #6256
Comments
Something wrong with registered keybindings, i.e. there should be undo handler for the search widget registered from Monaco which takes priority over default handler by |
The same problem applies to all other input fields: Search view (search text), Git view (commit message) etc. |
I just encountered that as well, I can't use undo/redo in any input text or textarea I used. const isTextElementFocused = () => {
const activeElement = document.activeElement;
return (activeElement instanceof HTMLInputElement && activeElement.type === "text") ||
activeElement instanceof HTMLTextAreaElement;
};
commands.registerHandler(CommonCommands.UNDO.id, {
execute: () => {
document.execCommand("undo", true);
},
isEnabled: isTextElementFocused
});
commands.registerHandler(CommonCommands.REDO.id, {
execute: () => {
document.execCommand("redo", true);
},
isEnabled: isTextElementFocused
}); Although the documentation says |
@spoenemann @502647092 @Hanksha Could you reproduce it against #7481? fyi I cannot Please help with testing 🙏 You can test with Gitpod: https://gitpod.io#https://github.com/eclipse-theia/theia/pull/7481 |
Yes it seems the issue is fixed in that revision! |
Looks like it's fixed, I'll try within my project as well once it's merged. |
Description
Reproduction Steps
Ctrl + F
open search at editorCtrl + Z
undo inputOS and Theia version:
Diagnostics:
The text was updated successfully, but these errors were encountered: