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
1 changed files with 1 additions and 0 deletions
|
@ -2693,6 +2693,7 @@ window.addEventListener('keydown', function keydown(evt) {
|
||||||
// is selected.
|
// is selected.
|
||||||
var curElement = document.activeElement || document.querySelector(':focus');
|
var curElement = document.activeElement || document.querySelector(':focus');
|
||||||
if (curElement && (curElement.tagName.toUpperCase() === 'INPUT' ||
|
if (curElement && (curElement.tagName.toUpperCase() === 'INPUT' ||
|
||||||
|
curElement.tagName.toUpperCase() === 'TEXTAREA' ||
|
||||||
curElement.tagName.toUpperCase() === 'SELECT')) {
|
curElement.tagName.toUpperCase() === 'SELECT')) {
|
||||||
// Make sure that the secondary toolbar is closed when Escape is pressed.
|
// Make sure that the secondary toolbar is closed when Escape is pressed.
|
||||||
if (evt.keyCode !== 27) { // 'Esc'
|
if (evt.keyCode !== 27) { // 'Esc'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue