From 1ab64fef6e861a2958bbd826f086b8aac7d0c359 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 10 Apr 2025 20:42:09 -0400 Subject: 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. --- src/client/views/pdf/PDFViewer.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/client/views/pdf') 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 { 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 { } 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({ -- cgit v1.2.3-70-g09d2