Skip to content

Commit

Permalink
Temp?: Disable pinch-zoom when highlighting
Browse files Browse the repository at this point in the history
Generates weird highlights because there's no way to distinguish a pinch-zoom
touch from any other touch.
  • Loading branch information
AbeJellinek committed Oct 30, 2023
1 parent 6f9041b commit 3b96e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom/common/dom-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ abstract class DOMView<State extends DOMViewState, Data> {
this._iframeDocument.documentElement.style.setProperty('--selection-color', selectionColor);

// When using any tool besides pointer, touches should annotate but pinch-zoom should still be allowed
this._iframeDocument.documentElement.style.touchAction = tool.type != 'pointer' ? 'pinch-zoom' : 'auto';
this._iframeDocument.documentElement.style.touchAction = tool.type != 'pointer' ? 'none' : 'auto';

if (this._previewAnnotation && tool.type !== 'note') {
this._previewAnnotation = null;
Expand Down

0 comments on commit 3b96e7d

Please sign in to comment.