diff options
author | bobzel <zzzman@gmail.com> | 2020-10-23 00:46:48 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-23 00:46:48 -0400 |
commit | 5fdc26ef1dcf7ea1260ee6ea05a38b7f3746eb25 (patch) | |
tree | d724ebd0a295521ae9784cfdf5028006f2ec4297 /src | |
parent | 9227d660cff098e8db0ed20c9b5283f79f833bdf (diff) |
fixed presBox to re-use a tab instead of creating one when Open is set.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/PresBox.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 01ca8240b..4149636b8 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -298,7 +298,12 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> const docToJump = curDoc; const willZoom = false; const openInTab = () => { - collectionDocView ? collectionDocView.props.addDocTab(activeItem, "replace") : this.props.addDocTab(activeItem, "replace:left"); + const tab = Array.from(CollectionDockingView.Instance.tabMap).find(tab => tab.DashDoc === activeItem); + if (tab) { + tab.header.parent.setActiveContentItem(tab.contentItem); + } else { + collectionDocView ? collectionDocView.props.addDocTab(activeItem, "replace") : this.props.addDocTab(activeItem, "replace:left"); + } }; // If openDocument is selected then it should open the document for the user if (activeItem.openDocument) { |