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:
commit
69eff38d09
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user