diff options
author | bobzel <zzzman@gmail.com> | 2020-08-09 23:09:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-09 23:09:49 -0400 |
commit | 1d2851b237fd41f8a8726244b095986699f513a5 (patch) | |
tree | 96c379afbbc9d4b8e0fe178db06fc9189d32b105 /src/client/views/linking/LinkMenuItem.tsx | |
parent | dc0ffc050b5b11e345245927f3d8a813937e588d (diff) |
fixed playing audio on link follow when audio opens on right or in tab
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
-rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index b95fccf2a..21c666a4d 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -162,7 +162,14 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> { } if (linkDoc.followLinkLocation && linkDoc.followLinkLocation !== "Default") { - this.props.addDocTab(this.props.destinationDoc, StrCast(linkDoc.followLinkLocation)); + const annotationOn = this.props.destinationDoc.annotationOn as Doc; + this.props.addDocTab(annotationOn instanceof Doc ? annotationOn : this.props.destinationDoc, StrCast(linkDoc.followLinkLocation)); + if (annotationOn) { + setTimeout(() => { + const dv = DocumentManager.Instance.getFirstDocumentView(this.props.destinationDoc); + dv?.props.focus(this.props.destinationDoc, false); + }); + } } else { DocumentManager.Instance.FollowLink(this.props.linkDoc, this.props.sourceDoc, doc => this.props.addDocTab(doc, "onRight"), false); } |