Search in browser action did not work every time.

Fixes #268
This commit is contained in:
kkapsner 2018-10-09 20:44:13 +02:00
parent 9ae73d6a3e
commit ce3699a03c
1 changed files with 2 additions and 1 deletions

View File

@ -86,13 +86,14 @@
actions.appendChild(search);
search.focus();
search.addEventListener("keyup", function(event){
search.addEventListener("keypress", function(event){
if ([10, 13].indexOf(event.keyCode) !== -1){
window.open(browser.extension.getURL(
"options/options.html" +
"?search=" +
encodeURIComponent(this.value)
));
window.close();
}
});
});