From 740f3924dff87b1340ca24f6ce2413a8f6008bbb Mon Sep 17 00:00:00 2001 From: n1474335 Date: Mon, 20 Aug 2018 00:10:57 +0100 Subject: [PATCH] Pressing return on a highlighted search result now correctly adds it to the recipe in Firefox. --- src/web/OperationsWaiter.mjs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/web/OperationsWaiter.mjs b/src/web/OperationsWaiter.mjs index e0286d4214..decc49d610 100755 --- a/src/web/OperationsWaiter.mjs +++ b/src/web/OperationsWaiter.mjs @@ -37,7 +37,7 @@ class OperationsWaiter { searchOperations(e) { let ops, selected; - if (e.type === "search") { // Search + if (e.type === "search" || e.keyCode === 13) { // Search or Return e.preventDefault(); ops = document.querySelectorAll("#search-results li"); if (ops.length) { @@ -48,9 +48,7 @@ class OperationsWaiter { } } - if (e.keyCode === 13) { // Return - e.preventDefault(); - } else if (e.keyCode === 40) { // Down + if (e.keyCode === 40) { // Down e.preventDefault(); ops = document.querySelectorAll("#search-results li"); if (ops.length) {