Merge pull request #7170 from Snuffleupagus/pr-7097-followup
Prevent the *entire* viewer from zooming, when quickly switching from scrolling to zooming using the mousewheel (PR 7097 followup)
This commit is contained in:
		
						commit
						1c253e6e1d
					
				@ -1838,12 +1838,15 @@ function handleMouseWheel(evt) {
 | 
				
			|||||||
  } else if (evt.ctrlKey || evt.metaKey) {
 | 
					  } else if (evt.ctrlKey || evt.metaKey) {
 | 
				
			||||||
    var support = PDFViewerApplication.supportedMouseWheelZoomModifierKeys;
 | 
					    var support = PDFViewerApplication.supportedMouseWheelZoomModifierKeys;
 | 
				
			||||||
    if ((evt.ctrlKey && !support.ctrlKey) ||
 | 
					    if ((evt.ctrlKey && !support.ctrlKey) ||
 | 
				
			||||||
        (evt.metaKey && !support.metaKey) ||
 | 
					        (evt.metaKey && !support.metaKey)) {
 | 
				
			||||||
        zoomDisabled) {
 | 
					 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // 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.
 | 
				
			||||||
 | 
					    if (zoomDisabled) {
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var previousScale = pdfViewer.currentScale;
 | 
					    var previousScale = pdfViewer.currentScale;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user