Merge pull request #3660 from maxidirienzo/master

viewer.js: Do not process keyboard shortcuts when focused element is a t...
This commit is contained in:
Yury Delendik 2013-09-09 08:17:50 -07:00
commit 69eff38d09

View File

@ -2693,6 +2693,7 @@ window.addEventListener('keydown', function keydown(evt) {
// is selected.
var curElement = document.activeElement || document.querySelector(':focus');
if (curElement && (curElement.tagName.toUpperCase() === 'INPUT' ||
curElement.tagName.toUpperCase() === 'TEXTAREA' ||
curElement.tagName.toUpperCase() === 'SELECT')) {
// Make sure that the secondary toolbar is closed when Escape is pressed.
if (evt.keyCode !== 27) { // 'Esc'