Merge pull request #17004 from Snuffleupagus/dialog-disable-zooming
Prevent wheel/touch zooming in the viewer when a dialog is open
This commit is contained in:
commit
edb83ffec2
@ -2736,7 +2736,11 @@ function webViewerWheel(evt) {
|
|||||||
// Only zoom the pages, not the entire viewer.
|
// Only zoom the pages, not the entire viewer.
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
// NOTE: this check must be placed *after* preventDefault.
|
// NOTE: this check must be placed *after* preventDefault.
|
||||||
if (zoomDisabledTimeout || document.visibilityState === "hidden") {
|
if (
|
||||||
|
zoomDisabledTimeout ||
|
||||||
|
document.visibilityState === "hidden" ||
|
||||||
|
PDFViewerApplication.overlayManager.active
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2812,7 +2816,7 @@ function webViewerTouchStart(evt) {
|
|||||||
}
|
}
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
if (evt.touches.length !== 2) {
|
if (evt.touches.length !== 2 || PDFViewerApplication.overlayManager.active) {
|
||||||
PDFViewerApplication._touchInfo = null;
|
PDFViewerApplication._touchInfo = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user