fix: unable to use cmd/ctrl-delete/backspace in inputs (#5348)

This commit is contained in:
David Luzar 2022-06-23 17:27:15 +02:00 committed by GitHub
parent 39d17c4a3c
commit 50bc7e099a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1731,11 +1731,13 @@ class App extends React.Component<AppProps, AppState> {
});
}
// bail if
if (
// inside an input
(isWritableElement(event.target) &&
!event[KEYS.CTRL_OR_CMD] &&
// unless pressing escape (finalize action)
event.key !== KEYS.ESCAPE) ||
// case: using arrows to move between buttons
// or unless using arrows (to move between buttons)
(isArrowKey(event.key) && isInputLike(event.target))
) {
return;