aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2020-08-12 14:52:37 +0800
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2020-08-12 14:52:37 +0800
commit998e549f6a713c92c66218322c53f2fba8d94706 (patch)
tree7c4cd3af8637110e3524b0a09e96106009c3bbf9 /src/client/views/GlobalKeyHandler.ts
parentbdce823ca6839fa7de4b927de484417bb596bba0 (diff)
parent8fd9d9348de59caccfac9e98102fea431ac46999 (diff)
Merge branch 'master' into presentation_updates
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index 0ea02e3cb..fd9b04128 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -108,7 +108,9 @@ export default class KeyManager {
GoogleAuthenticationManager.Instance.cancel();
SharingManager.Instance.close();
GroupManager.Instance.close();
- CollectionFreeFormViewChrome.Instance.clearKeep();
+ CollectionFreeFormViewChrome.Instance?.clearKeep();
+ window.getSelection()?.empty();
+ document.body.focus();
break;
case "delete":
case "backspace":
@@ -329,6 +331,8 @@ export default class KeyManager {
undoBatch(() => {
targetDataDoc[fieldKey] = new List<Doc>([...docList, ...added]);
targetDataDoc[fieldKey + "-lastModified"] = new DateField(new Date(Date.now()));
+ const lastModified = "lastModified";
+ targetDataDoc[lastModified] = new DateField(new Date(Date.now()));
})();
}
}