From 7fa30c3edd851cc42cb68063d9dbdd7335fe7370 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 7 Mar 2022 11:07:26 -0500 Subject: fixed pdf text selection/interaction --- src/client/views/nodes/PDFBox.tsx | 3 ++- src/client/views/pdf/PDFViewer.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 5b98103da..cbbf46a59 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -245,6 +245,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent 1; + isPdfContentActive = () => this.isAnyChildContentActive() || this.props.isSelected(); @computed get renderPdfView() { TraceMobx(); const previewScale = this._previewNativeWidth ? 1 - this.sidebarWidth() / this._previewNativeWidth : 1; @@ -269,7 +270,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent { @action onZoomWheel = (e: React.WheelEvent) => { - if (this.props.isSelected(false) || this.props.isContentActive(true)) { + if (this.props.isContentActive(true)) { e.stopPropagation(); if (e.ctrlKey) { const curScale = Number(this._pdfViewer.currentScaleValue); @@ -554,7 +554,7 @@ export class PDFViewer extends React.Component { ; } @computed get pdfViewerDiv() { - return
; + return
; } @computed get contentScaling() { return this.props.ContentScaling?.() || 1; } @computed get standinViews() { -- cgit v1.2.3-70-g09d2