aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-09-02 01:36:29 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-09-02 01:36:29 -0500
commit13845edece4087447bf9817c250381e645ffe037 (patch)
tree633c3e8671704906d9ab312a68dcf2ad47542c24 /src/client/util/DocumentManager.ts
parentccfcbd7394dc643babc390797ffc3bea71d9f84c (diff)
parent6f72743516e47a6ad077bb8e894c8005fee29fc7 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into anika_bug_fixes
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index f085f615c..2c7dcf49b 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -160,6 +160,8 @@ export class DocumentManager {
docView.props.Document.hidden = !docView.props.Document.hidden;
}
else {
+ const contView = docContext && getFirstDocView(docContext, originatingDoc);
+ contView && contView.topMost && contView.select(false); // bcz: change this to a function prop: popTab() that will make sure the tab for the document is topmost;
docView.select(false);
docView.props.Document.hidden && (docView.props.Document.hidden = undefined);
docView.props.focus(docView.props.Document, willZoom, undefined, focusAndFinish);