diff options
-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) { |