]> git.parisson.com Git - pdf.js.git/commitdiff
Disable keyboard shortcuts if current control is INPUT element
authornotmasteryet <async.processingjs@yahoo.com>
Wed, 21 Dec 2011 02:04:42 +0000 (20:04 -0600)
committernotmasteryet <async.processingjs@yahoo.com>
Wed, 21 Dec 2011 02:04:42 +0000 (20:04 -0600)
web/viewer.js

index 79df8280d1215f44610536607a7167362c6b22ad..e0eedaae6e7ff356eab3ded9688fcfc6c987884f 100644 (file)
@@ -964,6 +964,8 @@ window.addEventListener('pagechange', function pagechange(evt) {
 
 window.addEventListener('keydown', function keydown(evt) {
   var curElement = document.activeElement;
+  if (curElement && curElement.tagName == 'INPUT')
+    return;
   var controlsElement = document.getElementById('controls');
   while (curElement) {
     if (curElement === controlsElement)