mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Prevent wheel/touch zooming in the viewer when a dialog is open
This commit is contained in:
parent
e9f707ce3f
commit
9b21f17b03
1 changed files with 6 additions and 2 deletions
|
@ -2736,7 +2736,11 @@ function webViewerWheel(evt) {
|
|||
// Only zoom the pages, not the entire viewer.
|
||||
evt.preventDefault();
|
||||
// NOTE: this check must be placed *after* preventDefault.
|
||||
if (zoomDisabledTimeout || document.visibilityState === "hidden") {
|
||||
if (
|
||||
zoomDisabledTimeout ||
|
||||
document.visibilityState === "hidden" ||
|
||||
PDFViewerApplication.overlayManager.active
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2812,7 +2816,7 @@ function webViewerTouchStart(evt) {
|
|||
}
|
||||
evt.preventDefault();
|
||||
|
||||
if (evt.touches.length !== 2) {
|
||||
if (evt.touches.length !== 2 || PDFViewerApplication.overlayManager.active) {
|
||||
PDFViewerApplication._touchInfo = null;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue