diff options
| author | bobzel <zzzman@gmail.com> | 2021-09-24 09:10:57 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-09-24 09:10:57 -0400 |
| commit | 851647c8d399dc6e5d036ac11cbce4e8dd8c2eb9 (patch) | |
| tree | 6aadfb3e43882bcf1e7532c2f57eeb4be33b28ea /src/client/views/nodes/DocumentView.tsx | |
| parent | a4b3114f3792c80e20a3f40053ec4724729c1100 (diff) | |
| parent | 643df77e6366b7164307ffe195ed9de83b68e5ae (diff) | |
Merge branch 'master' into temporalmedia-mehek
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index b44b32832..ca68ee875 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -487,8 +487,6 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps if (this.onDoubleClickHandler) { this._timeout = setTimeout(() => { this._timeout = undefined; clickFunc(); }, 350); } else clickFunc(); - } else if (this.Document["onClick-rawScript"] && !StrCast(Doc.LayoutField(this.layoutDoc))?.includes("ScriptingBox")) {// bcz: hack? don't edit a script if you're clicking on a scripting box itself - this.props.addDocTab(DocUtils.makeCustomViewClicked(Doc.MakeAlias(this.props.Document), undefined, "onClick"), "add:right"); } else if (this.allLinks && this.Document.type !== DocumentType.LINK && this.Document.isLinkButton && !e.shiftKey && !e.ctrlKey) { this.allLinks.length && LinkManager.FollowLink(undefined, this.props.Document, this.props, e.altKey); } else { @@ -582,8 +580,9 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps if (this.Document._isLinkButton && !this.onClickHandler) { this.Document.followLinkZoom = zoom; this.Document.followLinkLocation = location; - } else { - this.Document.onClick = this.layoutDoc.onClick = undefined; + } else if (this.Document._isLinkButton && this.onClickHandler) { + this.Document._isLinkButton = false; + this.Document["onClick-rawScript"] = this.dataDoc["onClick-rawScript"] = this.dataDoc.onClick = this.Document.onClick = this.layoutDoc.onClick = undefined; } } @undoBatch @action |
