ignore keypress for another elements

This commit is contained in:
Shin'ya Ueoka 2017-09-20 20:01:23 +09:00
parent c5aaaa948f
commit 71c271cdf0

View file

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