aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index f3d8fc181..73138dcd8 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -255,6 +255,7 @@ export class MainView extends React.Component {
@action
createNewWorkspace = async (id?: string) => {
const myCatalog = Doc.UserDoc().myCatalog as Doc;
+ const myPresentations = Doc.UserDoc().myPresentations as Doc;
const presentation = Doc.MakeCopy(Doc.UserDoc().emptyPresentation as Doc, true);
const workspaces = Cast(this.userDoc.myWorkspaces, Doc) as Doc;
const workspaceCount = DocListCast(workspaces.data).length + 1;
@@ -269,6 +270,7 @@ export class MainView extends React.Component {
const workspaceDoc = Docs.Create.StandardCollectionDockingDocument([{ doc: freeformDoc, initialWidth: 600, path: [myCatalog] }], { title: `Workspace ${workspaceCount}` }, id, "row");
Doc.AddDocToList(myCatalog, "data", freeformDoc);
Doc.AddDocToList(myCatalog, "data", presentation);
+ Doc.AddDocToList(myPresentations, "data", presentation);
Doc.UserDoc().activePresentation = presentation;
const toggleTheme = ScriptField.MakeScript(`self.darkScheme = !self.darkScheme`);
const toggleComic = ScriptField.MakeScript(`toggleComicMode()`);
@@ -895,7 +897,7 @@ export class MainView extends React.Component {
document.removeEventListener("editSuccess", onSuccess);
};
- // For some reason, Hypothes.is annotations don't load until a click is registered on the page,
+ // For some reason, Hypothes.is annotations don't load until a click is registered on the page,
// so we keep simulating clicks until annotations have loaded and editing is successful
const interval = setInterval(() => {
!success && simulateMouseClick(ele, 50, 50, 50, 50);