aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index 50518eec1..5a6caf995 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -139,7 +139,7 @@ export class KeyManager {
document.body.focus();
break;
case 'enter': {
- DocumentDecorations.Instance.onCloseClick(false);
+ //DocumentDecorations.Instance.onCloseClick(false);
break;
}
case 'delete':
@@ -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()