aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2022-10-31 14:33:42 -0400
committergeireann <geireann.lindfield@gmail.com>2022-10-31 14:33:42 -0400
commit85f9dd5b114ed44a13c11eeded12666f0d7e7be2 (patch)
treeb6bbdd3319312eb26dce931c7b5ab0c6514e84d3 /src/client/views/GlobalKeyHandler.ts
parentaaf2c5fb4c0b6c6063f824eda3ff29c3bf18d2c4 (diff)
parent70c998562c8560283a7d6b9a1ae78b9207e3720f (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index 50518eec1..c19e6831f 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -151,11 +151,6 @@ export class KeyManager {
SelectionManager.DeselectAll();
} else DocumentDecorations.Instance.onCloseClick(true);
}, 'backspace');
- // 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));
- // }, "delete");
return { stopPropagation: true, preventDefault: true };
}
break;
@@ -307,7 +302,7 @@ export class KeyManager {
}
break;
case 'c':
- if (!AnchorMenu.Instance.Active && DocumentDecorations.Instance.Bounds.r - DocumentDecorations.Instance.Bounds.x > 2) {
+ if ((document.activeElement as any)?.type !== 'text' && !AnchorMenu.Instance.Active && DocumentDecorations.Instance.Bounds.r - DocumentDecorations.Instance.Bounds.x > 2) {
const bds = DocumentDecorations.Instance.Bounds;
const pt = SelectionManager.Views()[0]
.props.ScreenToLocalTransform()