diff options
author | mehekj <mehek.jethani@gmail.com> | 2022-11-07 12:57:52 -0500 |
---|---|---|
committer | mehekj <mehek.jethani@gmail.com> | 2022-11-07 12:57:52 -0500 |
commit | a73521cdbccf9bed1326d24522e133fad4a0de26 (patch) | |
tree | e01371f6f845318831cf45f0dbc1d04d0d18f34c /src/client/views/GlobalKeyHandler.ts | |
parent | 213a92ba3aa39d144754029fde32b9d69b0f51cf (diff) | |
parent | 31a51e9dda07e48c88166bffbc8f1ad7166cd624 (diff) |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r-- | src/client/views/GlobalKeyHandler.ts | 9 |
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() |