Remove obsolete code from shortcut handler
These lines were introduced in 612f59aa10eef2bf6559deddfb54b84a0a30c6bc 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.
This commit is contained in:
parent
acb33b3e7d
commit
64a4a27455
@ -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…
x
Reference in New Issue
Block a user