Fix scroll keys in Firefox
This commit is contained in:
		
							parent
							
								
									5beefde2c7
								
							
						
					
					
						commit
						6102b6197f
					
				@ -265,11 +265,7 @@ limitations under the License.
 | 
				
			|||||||
                    data-l10n-id="page_rotate_ccw"></menuitem>
 | 
					                    data-l10n-id="page_rotate_ccw"></menuitem>
 | 
				
			||||||
        </menu>
 | 
					        </menu>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!--#if (FIREFOX || MOZCENTRAL) -->
 | 
					 | 
				
			||||||
<!--    <div id="viewerContainer"> -->
 | 
					 | 
				
			||||||
<!--#else -->
 | 
					 | 
				
			||||||
        <div id="viewerContainer" tabindex="0">
 | 
					        <div id="viewerContainer" tabindex="0">
 | 
				
			||||||
<!--#endif -->
 | 
					 | 
				
			||||||
          <div id="viewer"></div>
 | 
					          <div id="viewer"></div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -2015,6 +2015,11 @@ window.addEventListener('keydown', function keydown(evt) {
 | 
				
			|||||||
      return; // ignoring if the 'toolbar' element is focused
 | 
					      return; // ignoring if the 'toolbar' element is focused
 | 
				
			||||||
    curElement = curElement.parentNode;
 | 
					    curElement = curElement.parentNode;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					//#if (FIREFOX || MOZCENTRAL)
 | 
				
			||||||
 | 
					//// Workaround for issue in Firefox, that prevents scroll keys from working
 | 
				
			||||||
 | 
					//// when elements with 'tabindex' are focused.
 | 
				
			||||||
 | 
					//PDFView.container.blur();
 | 
				
			||||||
 | 
					//#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (cmd === 0) { // no control key pressed at all.
 | 
					  if (cmd === 0) { // no control key pressed at all.
 | 
				
			||||||
    switch (evt.keyCode) {
 | 
					    switch (evt.keyCode) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user