blur on input elements when Esc pressed
This commit is contained in:
parent
6c01283973
commit
1a21e548d9
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ window.addEventListener('keypress', (e) => {
|
|||
if (e.target instanceof HTMLInputElement ||
|
||||
e.target instanceof HTMLTextAreaElement ||
|
||||
e.target instanceof HTMLSelectElement) {
|
||||
if (e.key === 'Escape' && e.target.blur) {
|
||||
e.target.blur();
|
||||
}
|
||||
return;
|
||||
}
|
||||
browser.runtime.sendMessage({
|
||||
|
|
Reference in a new issue