aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
authoraidahosa1 <aisosa_idahosa@brown.edu>2024-09-17 09:29:33 -0400
committeraidahosa1 <aisosa_idahosa@brown.edu>2024-09-17 09:29:33 -0400
commit1568898125218538a93666cf5d83b9cf01739b49 (patch)
tree0c05f094cec54aeee2286548fc89080336004d90 /src/client/views/GlobalKeyHandler.ts
parent2b4288efa2f21db46addd19c8884f80dba835f2d (diff)
parentc36607691e0b7f5c04f3209a64958f5e51ddd785 (diff)
Merge branch 'master' into aisosa-starter
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index 7d01bbabb..a85a03aab 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -56,7 +56,7 @@ export class KeyManager {
window.addEventListener('keydown', KeyManager.Instance.handle);
window.removeEventListener('keyup', KeyManager.Instance.unhandle);
window.addEventListener('keyup', KeyManager.Instance.unhandle);
- window.addEventListener('paste', KeyManager.Instance.paste as any);
+ window.addEventListener('paste', KeyManager.Instance.paste);
}
public unhandle = action((/* e: KeyboardEvent */) => {
@@ -330,7 +330,7 @@ export class KeyManager {
}
break;
case 'c':
- if ((document.activeElement as any)?.type !== 'text' && !AnchorMenu.Instance.Active && DocumentDecorations.Instance.Bounds.r - DocumentDecorations.Instance.Bounds.x > 2) {
+ if (!AnchorMenu.Instance.Active && DocumentDecorations.Instance.Bounds.r - DocumentDecorations.Instance.Bounds.x > 2) {
const bds = DocumentDecorations.Instance.Bounds;
const pt = DocumentView.Selected()[0]
.screenToViewTransform()