diff options
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 2c22bde81..a0a47ecfd 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -740,7 +740,11 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu cm.addItem({ description: "make hypothesis link", event: () => { const docUrl = Utils.prepend("/doc/" + this.props.Document[Id]); - document.dispatchEvent(new CustomEvent("hypothesisLink", { detail: docUrl })); + const docTitle = StrCast(this.layoutDoc.title); + document.dispatchEvent(new CustomEvent<{ url: string, title: string }>("hypothesisLink", { + detail: { url: docUrl, title: docTitle }, + bubbles: true + })); }, icon: "eye" }); |