diff options
author | bobzel <zzzman@gmail.com> | 2022-06-05 01:55:26 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-06-05 01:55:26 -0400 |
commit | d3e2c8d1be275ed04e0b5164960c3fc60334ce8f (patch) | |
tree | 96e8c0cc660daa8bc78f285ab7035b31007873ce /src | |
parent | 98435cb929b1e593bc561c6c56e2db07036aae63 (diff) |
fixed pdf search and page inputs to not iconify with Enter. fixed lightbox to change icons when fitwidth is clicked.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/LightboxView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 3d2769f66..9f890ffad 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -284,7 +284,7 @@ export class LightboxView extends React.Component<LightboxViewProps> { </div> <div className="lightboxView-navBtn" title={"toggle fit width"} onClick={e => { e.stopPropagation(); LightboxView.LightboxDoc!._fitWidth = !LightboxView.LightboxDoc!._fitWidth; }}> - <FontAwesomeIcon icon={"arrows-alt-h"} size="2x" /> + <FontAwesomeIcon icon={LightboxView.LightboxDoc?._fitWidth ? "arrows-alt-h" : "arrows-alt-v"} size="2x" /> </div> </div>; } diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index cbe7a5cc6..f2ca6c96e 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -320,7 +320,10 @@ export class PDFBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps <div className="pdfBox-overlayCont" onPointerDown={(e) => e.stopPropagation()} style={{ left: `${this._searching ? 0 : 100}%` }}> <button className="pdfBox-overlayButton" title={searchTitle} /> <input className="pdfBox-searchBar" placeholder="Search" ref={this._searchRef} onChange={this.searchStringChanged} - onKeyDown={e => e.keyCode === KeyCodes.ENTER && this.search(this._searchString, e.shiftKey)} /> + onKeyDown={e => { + e.stopPropagation(); + e.keyCode === KeyCodes.ENTER && this.search(this._searchString, e.shiftKey); + }} /> <button className="pdfBox-search" title="Search" onClick={e => this.search(this._searchString, e.shiftKey)}> <FontAwesomeIcon icon="search" size="sm" /> </button> @@ -342,6 +345,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps <div className="pdfBox-pageNums"> <input value={curPage} style={{ width: `${curPage > 99 ? 4 : 3}ch`, pointerEvents: "all" }} onChange={e => this.Document._curPage = Number(e.currentTarget.value)} + onKeyDown={e => e.stopPropagation()} onClick={action(() => this._pageControls = !this._pageControls)} /> {this._pageControls ? pageBtns : (null)} </div> |