diff --git a/search.js b/search.js index 9abfcf3..58362a4 100644 --- a/search.js +++ b/search.js @@ -353,9 +353,6 @@ function hookInput(node) { node.addEventListener("keydown", function (e) { // console.log("keydown", e.nativeEvent.which); - if (e.target.value.includes("from:")) { - fetchSearchResults(e.target.value); - } console.log(e.key); if (e.key === "Enter") { @@ -387,6 +384,12 @@ function hookInput(node) { } + + else if (e.target.value.includes("from:")) { + fetchSearchResults(e.target.value); + return false + } + }); node.dataset.processed = true;