From 50bc7e099ae5ecc75d449d2e16bf783f6b4acd17 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Thu, 23 Jun 2022 17:27:15 +0200 Subject: [PATCH] fix: unable to use cmd/ctrl-delete/backspace in inputs (#5348) --- src/components/App.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 4a861f08..a16fcdf5 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1731,11 +1731,13 @@ class App extends React.Component { }); } + // 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;