diff options
| author | bobzel <zzzman@gmail.com> | 2025-04-10 20:42:09 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-04-10 20:42:09 -0400 |
| commit | 1ab64fef6e861a2958bbd826f086b8aac7d0c359 (patch) | |
| tree | be4e1c1d035ec9c15ecca6b3bc3303d09d0ea70d /src/client/views/pdf/PDFViewer.tsx | |
| parent | 75e76f1ec098ea9cbcd76432002da1bb73d74eba (diff) | |
fixed dashfieldviews in text boxes to show ellipsis for long lines and to hide dropdown menu when field is not editable. fixed pasting from pdf's to work and to display the entire text box.
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
| -rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index ed2f661e6..9aa0e8e8b 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -134,7 +134,7 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> { componentWillUnmount = () => { Object.values(this._disposers).forEach(disposer => disposer?.()); - document.removeEventListener('copy', this.copy); + document.removeEventListener('copy', this.copy, true); }; copy = (e: ClipboardEvent) => { @@ -262,16 +262,11 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> { } return; } - document.removeEventListener('copy', this.copy); - document.addEventListener('copy', this.copy); + document.removeEventListener('copy', this.copy, true); + document.addEventListener('copy', this.copy, true); const eventBus = new PDFJSViewer.EventBus(); eventBus._on('pagesinit', this.pagesinit); - eventBus._on( - 'pagerendered', - action(() => { - this._showWaiting = false; - }) - ); + eventBus._on('pagerendered',action(() => (this._showWaiting = false))); // prettier-ignore const pdfLinkService = new PDFJSViewer.PDFLinkService({ eventBus }); const pdfFindController = new PDFJSViewer.PDFFindController({ linkService: pdfLinkService, eventBus }); this._pdfViewer = new PDFJSViewer.PDFViewer({ |
