mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
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.
This commit is contained in:
parent
acb33b3e7d
commit
64a4a27455
1 changed files with 0 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue