aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-03-01 17:53:56 -0500
committermehekj <mehek.jethani@gmail.com>2023-03-01 17:53:56 -0500
commit9853c1e3ca1c3a1d2da210118b927adc559e67fa (patch)
treef8dc9f8c92a8f8cea02779bfe1952b73c0666019 /src/client/views/nodes/DocumentView.tsx
parent4137fa5fedae84aa781f3ba22ddfb2410a0cad9a (diff)
override onclick script
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 36c0240f1..5e7037754 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -644,7 +644,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
}
} else if (!this._longPress && this.onClickHandler?.script && !isScriptBox()) {
// bcz: hack? don't execute script if you're clicking on a scripting box itself
- const { clientX, clientY, shiftKey, altKey } = e;
+ const { clientX, clientY, shiftKey, altKey, metaKey } = e;
const func = () =>
this.onClickHandler.script.run(
{
@@ -658,6 +658,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
clientY,
shiftKey,
altKey,
+ metaKey,
},
console.log
).result?.select === true