From 71c271cdf02beca8c706a4e18832c119efa0eeea Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 20 Sep 2017 20:01:23 +0900 Subject: [PATCH] ignore keypress for another elements --- src/content/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/index.js b/src/content/index.js index 8fb142a..571a927 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -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({