ignore keypress for another elements

jh-changes
Shin'ya Ueoka 7 years ago
parent c5aaaa948f
commit 71c271cdf0
  1. 4
      src/content/index.js

@ -51,7 +51,9 @@ const startFollows = (newTab) => {
}; };
window.addEventListener('keypress', (e) => { window.addEventListener('keypress', (e) => {
if (e.target instanceof HTMLInputElement) { if (e.target instanceof HTMLInputElement ||
e.target instanceof HTMLTextAreaElement ||
e.target instanceof HTMLSelectElement) {
return; return;
} }
browser.runtime.sendMessage({ browser.runtime.sendMessage({