diff options
author | bobzel <zzzman@gmail.com> | 2022-02-28 11:50:37 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-02-28 11:50:37 -0500 |
commit | 0b9e28a92487dc3a69519877d92235fca02b1b8c (patch) | |
tree | beec1c46f1f22195d20b804054049fdaadb7e21a /src/client/views/nodes/WebBox.tsx | |
parent | 2ec32aee559749e1978d779705c84a8343615bfe (diff) |
fixed double-clicking to open web page to keep showing thumbnail until web page is ready.
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index dd971aafa..6c22df4d8 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -128,7 +128,9 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps }); } })); - } else if (!this.props.isContentActive()) { + } else if (!this.props.isContentActive() && + !this.props.docViewPath().lastElement()?.docView?._pendingDoubleClick && /// don't create a thumbnail when double-clicking to enter lightbox because thumbnail will be empty + LightboxView.LightboxDoc !== this.rootDoc) { // don't create a thumbnail if entering Lightbox from maximize either, since thumb will be empty. const imageBitmap = ImageCast(this.layoutDoc["thumb-frozen"])?.url.href; if (this._iframe && !imageBitmap) { var htmlString = this._iframe.contentDocument && new XMLSerializer().serializeToString(this._iframe.contentDocument); @@ -554,7 +556,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps } @computed get urlContent() { - if (this._hackHide || (this.webThumb && !this._webPageHasBeenRendered)) return (null); + if (this._hackHide || (this.webThumb && (!this._webPageHasBeenRendered && LightboxView.LightboxDoc !== this.rootDoc))) return (null); const field = this.dataDoc[this.props.fieldKey]; let view; if (field instanceof HtmlField) { @@ -707,7 +709,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps pointerEvents={this._isAnnotating || SnappingManager.GetIsDragging() ? "all" : "none"} />; return ( <div className="webBox" ref={this._mainCont} - style={{ pointerEvents: this.pointerEvents(), display: !this.props.isSelected() && !this.isAnyChildContentActive() && this.webThumb ? "none" : undefined }} > + style={{ pointerEvents: this.pointerEvents(), display: !this.props.isSelected() && !this.isAnyChildContentActive() && LightboxView.LightboxDoc !== this.rootDoc && this.webThumb ? "none" : undefined }} > <div className="webBox-container" style={{ pointerEvents }} onContextMenu={this.specificContextMenu}> <div className={"webBox-outerContent"} ref={this._outerRef} style={{ |