WebViewer Version: 11.4.0
Issue with specific file(s)?
No, any document exhibits the issue.
Reproducible using one of the samples or online demos?
Yes. The issue can be reproduced using the standard WebViewer demo or a minimal implementation created with WebViewer({ licenseKey, initialDoc, …}).
Are you using the WebViewer server?
No.
Does the issue only happen on certain browsers?
It only occurs on mobile browsers (Chrome on Android and Safari on iOS). It does not occur on desktop.
Is your issue related to a front‑end framework?
We are using React, but the problem also appears in a plain setup without a framework.
Is your issue related to annotations?
No.
Brief summary
Disable the automatic zoom triggered by a double‑tap when the PanTool is active or when double‑tapping inside a ContentEdit text box on mobile devices.
Detailed description and steps to reproduce
Instantiate WebViewer 11.4.0 with default settings.
Open the app on a mobile device (iOS or Android).
Select the Pan tool from the toolbar.
Double‑tap anywhere on the document.
On mobile, this double‑tap automatically zooms in. I’d like to disable this behaviour so that double‑taps do nothing when the PanTool is selected.
An additional scenario is when using the ContentEdit feature to edit text annotations. In a typical mobile UX, double‑tapping inside a text box should select a word. In WebViewer, double‑tapping inside the editing box triggers the global zoom instead of selecting the word. This makes text editing difficult.
What I’ve already tried:
Overriding mouseDoubleClick on the Pan tool to return false or call event.preventDefault(). This did not affect mobile.
Listening for the dblClick event on the DocumentViewer and calling preventDefault()/stopImmediatePropagation() on the native event
. The zoom still occurs.
Applying the CSS property touch-action: manipulation or pan-x pan-y to the viewer container to prevent double‑tap zoom
. WebViewer resets this to auto when tools change, so the zoom behaviour comes back.
Using a MutationObserver to re‑apply the touch-action value whenever WebViewer modifies it. This partly works but isn’t reliable.
Is there an official way to disable double‑tap zoom on mobile—both when the Pan tool is active and when double‑tapping inside ContentEdit text boxes? Or is there a supported method to override the handleDoubleTap behaviour for these cases?
Link to a minimal reproducible sample
The behaviour can be seen on the official demo: Apryse WebViewer Demo: JavaScript PDF Viewer Demo
(open on a mobile device, select the Pan tool, and double‑tap on the document; then edit a text annotation and try to double‑tap a word).