diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-03-23 15:16:40 -0400 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-03-23 15:16:40 -0400 |
| commit | 5c22004907c210951154017609746e86362c4fb5 (patch) | |
| tree | 108371dccd171c6bd523a01dc3f39a657d85ad96 /src/client/util/DocumentManager.ts | |
| parent | 016e51965ae2d0a83ca2d4e17000d57a40aac264 (diff) | |
| parent | 923f0fdb0f039a923e4e6f870158bd2f2ba32db0 (diff) | |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/util/DocumentManager.ts')
| -rw-r--r-- | src/client/util/DocumentManager.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index f2c554866..947613801 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -265,6 +265,7 @@ export class DocumentManager { let rootContextView = await new Promise<DocumentView>(res => { const viewIndex = docContextPath.findIndex(doc => this.getDocumentView(doc)); if (viewIndex !== -1) return res(this.getDocumentView(docContextPath[viewIndex])!); + options.didMove = true; docContextPath.some(doc => TabDocView.Activate(doc)) || MainView.addDocTabFunc(docContextPath[0], options.openLocation as OpenWhere); this.AddViewRenderedCb(docContextPath[0], dv => res(dv)); }); @@ -299,7 +300,7 @@ export class DocumentManager { PresBox.restoreTargetDocView(docView, viewSpec, options.zoomTime ?? 500); Doc.linkFollowHighlight(docView.rootDoc, undefined, options.effect); if (options.playAudio) DocumentManager.playAudioAnno(docView.rootDoc); - if (options.toggleTarget) docView.rootDoc.hidden = !docView.rootDoc.hidden; + if (options.toggleTarget && (!options.didMove || docView.rootDoc.hidden)) docView.rootDoc.hidden = !docView.rootDoc.hidden; if (options.effect) docView.rootDoc[AnimationSym] = options.effect; if (options.zoomTextSelections && Doc.UnhighlightTimer && contextView && viewSpec.textHtml) { |
