mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Pressing return on a highlighted search result now correctly adds it to the recipe in Firefox.
This commit is contained in:
parent
f052ed9b00
commit
740f3924df
1 changed files with 2 additions and 4 deletions
|
@ -37,7 +37,7 @@ class OperationsWaiter {
|
||||||
searchOperations(e) {
|
searchOperations(e) {
|
||||||
let ops, selected;
|
let ops, selected;
|
||||||
|
|
||||||
if (e.type === "search") { // Search
|
if (e.type === "search" || e.keyCode === 13) { // Search or Return
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
ops = document.querySelectorAll("#search-results li");
|
ops = document.querySelectorAll("#search-results li");
|
||||||
if (ops.length) {
|
if (ops.length) {
|
||||||
|
@ -48,9 +48,7 @@ class OperationsWaiter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.keyCode === 13) { // Return
|
if (e.keyCode === 40) { // Down
|
||||||
e.preventDefault();
|
|
||||||
} else if (e.keyCode === 40) { // Down
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
ops = document.querySelectorAll("#search-results li");
|
ops = document.querySelectorAll("#search-results li");
|
||||||
if (ops.length) {
|
if (ops.length) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue