aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/DocUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-06 19:46:43 -0500
committerbobzel <zzzman@gmail.com>2025-03-06 19:46:43 -0500
commit1ab6f6c87b746e0c2898694216db50d5faadf7f5 (patch)
tree84349c4bcbdfa0a53c4937421867e7665e7da663 /src/client/documents/DocUtils.ts
parent5ad858090f3006631062877d90120e3cc505fada (diff)
a bunch of changes to improve how docs are selected automatically when created.
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-rw-r--r--src/client/documents/DocUtils.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts
index 7e0416447..9797a407b 100644
--- a/src/client/documents/DocUtils.ts
+++ b/src/client/documents/DocUtils.ts
@@ -385,7 +385,7 @@ export namespace DocUtils {
newDoc.x = x;
newDoc.y = y;
newDoc[DocData].backgroundColor = Doc.UserDoc().textBackgroundColor;
- Doc.SetSelectOnLoad(newDoc);
+ DocumentView.SetSelectOnLoad(newDoc);
if (pivotField) {
newDoc[pivotField] = pivotValue;
}
@@ -408,6 +408,7 @@ export namespace DocUtils {
description: ':Daily Journal',
event: undoable(() => {
const newDoc = Docs.Create.DailyJournalDocument('', { x, y });
+ DocumentView.SetSelectOnLoad(newDoc);
docAdder?.(newDoc);
}, 'Create Daily Journal'),
icon: 'book',
@@ -456,7 +457,7 @@ export namespace DocUtils {
newDoc.author = ClientUtils.CurrentUserEmail();
newDoc.x = x;
newDoc.y = y;
- Doc.SetSelectOnLoad(newDoc);
+ DocumentView.SetSelectOnLoad(newDoc);
if (pivotField) {
newDoc[pivotField] = pivotValue;
}