Browse Source

Remove obsolete code from shortcut handler

These lines were introduced in 612f59aa10
when the only shortcuts were +/-/=/0 (to change zoom level).
Back then, when the input fields were focused, using these keys would
add these unwanted characters to the input field and change the zoom
level of the viewer. Having both operations at the same time was an
undesired event, so a check was inserted, to ignore shortcuts when
the toolbar is focused.

The #toolbar element doesn't exist any more, so these lines are obsolete.
Rob Wu 11 years ago
parent
commit
64a4a27455
  1. 6
      web/viewer.js

6
web/viewer.js

@ -2168,12 +2168,6 @@ window.addEventListener('keydown', function keydown(evt) { @@ -2168,12 +2168,6 @@ window.addEventListener('keydown', function keydown(evt) {
return;
}
}
var controlsElement = document.getElementById('toolbar');
while (curElement) {
if (curElement === controlsElement && !PresentationMode.active)
return; // ignoring if the 'toolbar' element is focused
curElement = curElement.parentNode;
}
//#if (FIREFOX || MOZCENTRAL)
//// Workaround for issue in Firefox, that prevents scroll keys from working
//// when elements with 'tabindex' are focused.

Loading…
Cancel
Save