From 64a4a2745591cf21e8cd38e653334dfd05de83fd Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Thu, 30 Jan 2014 15:26:51 +0100 Subject: [PATCH] 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. --- web/viewer.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/web/viewer.js b/web/viewer.js index 211ae6bab..cb7051c92 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -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.