aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-26 23:34:32 -0400
committerbobzel <zzzman@gmail.com>2021-09-26 23:34:32 -0400
commit67703bcbc6dbc01e360d07de19648a9faab4899b (patch)
treed7e737ea245086bfc25686dabcbf191090d656d0 /src
parent27baf4ef57b2816b3c5147f38eddc9fac2ed6907 (diff)
don't delete tab if it's selected and backspace is typed.
Diffstat (limited to 'src')
-rw-r--r--src/client/views/GlobalKeyHandler.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index de6f4ae8b..574d28b8f 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -141,7 +141,7 @@ export class KeyManager {
case "delete":
case "backspace":
if (document.activeElement?.tagName !== "INPUT" && document.activeElement?.tagName !== "TEXTAREA") {
- const selected = SelectionManager.Views().slice();
+ const selected = SelectionManager.Views().filter(dv => !dv.topMost);;
UndoManager.RunInBatch(() => {
SelectionManager.DeselectAll();
selected.map(dv => !dv.props.Document._stayInCollection && dv.props.removeDocument?.(dv.props.Document));