Describe the bug
When using the TextControl component, pressing ctrl+z is expected to undo what you've written inside the component, and this works in most scenarios such as the sidebar.
What I've noticed is that a TextControl generated from within the editor never gets these keyboard events passed down it - so pressing ctrl+z results in the editors undo state being modified, while the current TextControl I'm using doesn't get affected at all. This is occuring for my TextControls in Popovers + Modals, as well as reproducible with built in components.
To reproduce
- In a block, type some text, and create a link from it
- Enter a URL in the inline popup UI
- Before submitting, press ctrl-z
- Notice the document performs an undo, and the current focussed TextControl does nothing (if you've just started a new document, the whole thing disseapears, but if you have multiple undo levels before you created the link, you will see it step through them)
- Right clicking inside the URL TextControl, shows the browser
undo/redo and they work as expected
Expected behavior
Pressing ctrl-z or ctrl-y inside a TextControl should allow for the native browser implementation of undo/redo within a text input field, and the document should not go back an undo level.
Screenshots

Desktop:
- Windows 10
- Chrome, Edge, Firefox
Additional context
Describe the bug
When using the
TextControlcomponent, pressing ctrl+z is expected to undo what you've written inside the component, and this works in most scenarios such as the sidebar.What I've noticed is that a
TextControlgenerated from within the editor never gets these keyboard events passed down it - so pressing ctrl+z results in the editors undo state being modified, while the current TextControl I'm using doesn't get affected at all. This is occuring for my TextControls in Popovers + Modals, as well as reproducible with built in components.To reproduce
undo/redoand they work as expectedExpected behavior
Pressing ctrl-z or ctrl-y inside a TextControl should allow for the native browser implementation of undo/redo within a text input field, and the document should not go back an undo level.
Screenshots

Desktop:
Additional context