aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DocumentView.tsx1
-rw-r--r--src/client/views/pdf/PDFViewer.tsx8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index c8f677c5f..541dddd83 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -337,6 +337,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
DocumentView.LongPress ||
this.props.onClickScriptDisable === 'always' ||
this._componentView?.onClickScriptDisable?.() ||
+ (this.props.onClickScriptDisable !== 'never' && (this.rootSelected() || this.props.isSelected())) ||
this._componentView?.isAnyChildContentActive?.()
);
}
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 86d14c22e..eb3087399 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -7,7 +7,7 @@ import { Id } from '../../../fields/FieldSymbols';
import { InkTool } from '../../../fields/InkField';
import { Cast, NumCast, StrCast } from '../../../fields/Types';
import { TraceMobx } from '../../../fields/util';
-import { addStyleSheet, addStyleSheetRule, clearStyleSheetRules, emptyFunction, OmitKeys, smoothScroll, Utils } from '../../../Utils';
+import { addStyleSheet, addStyleSheetRule, clearStyleSheetRules, emptyFunction, OmitKeys, returnNone, smoothScroll, Utils } from '../../../Utils';
import { DocUtils } from '../../documents/Documents';
import { DragManager } from '../../util/DragManager';
import { SelectionManager } from '../../util/SelectionManager';
@@ -404,7 +404,10 @@ export class PDFViewer extends React.Component<IViewerProps> {
document.removeEventListener('pointermove', this.onSelectMove);
};
- onSelectMove = (e: PointerEvent) => e.stopPropagation();
+ onSelectMove = (e: PointerEvent) => {
+ this.props.DocumentView?.().docView?.cancelMoveEvents();
+ e.stopPropagation();
+ };
@action
onSelectEnd = (e: PointerEvent): void => {
@@ -530,6 +533,7 @@ export class PDFViewer extends React.Component<IViewerProps> {
<CollectionFreeFormView
{...OmitKeys(this.props, ['NativeWidth', 'NativeHeight', 'setContentView']).omit}
renderDepth={this.props.renderDepth + 1}
+ pointerEvents={returnNone}
isAnnotationOverlay={true}
fieldKey={this.props.fieldKey + '-annotations'}
CollectionView={undefined}