aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx6
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"
});