Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

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

David Luzar50bc7e099ae5
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 4a861f085e..a16fcdf5e6 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -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;