[#181] resolve favourites cat closing on initial opening mobile UI, update TODO

This commit is contained in:
Robin Scholtes 2023-04-20 20:54:14 +12:00
parent 3d03a31f38
commit a547935f0a
2 changed files with 5 additions and 10 deletions

View file

@ -5,7 +5,6 @@
### Mobile UI:
#### Operations:
- on click of `input[type="search]`, `favourites` briefly opens and closes. It should remain open until further action.
- on mobile, there is almost no visual feedback when adding an operation to the recipe list. Since the recipe list is not visible like on desktop, this is very confusing UX
#### General mobile UX:

View file

@ -38,10 +38,6 @@ class OperationsWaiter {
searchOperations(e) {
let ops, selected;
if (e.type === "click" && !e.target.value.length){
this.openOperationsDropdown();
}
if (e.type === "keyup"){
const searchResults = document.getElementById("search-results");
@ -52,10 +48,6 @@ class OperationsWaiter {
}
}
if (e.type === "keyup" && e.keyCode === 27 ) { // Escape
this.closeOperationsDropdown();
}
if (e.type === "search" || e.keyCode === 13) { // Search or Return
e.preventDefault();
ops = document.querySelectorAll("#search-results li");
@ -67,7 +59,11 @@ class OperationsWaiter {
}
}
if (e.keyCode === 40) { // Down
if (e.type === "click" && !e.target.value.length){
this.openOperationsDropdown();
} else if (e.keyCode === 27 ) { // Escape
this.closeOperationsDropdown();
} else if (e.keyCode === 40) { // Down
e.preventDefault();
ops = document.querySelectorAll("#search-results li");
if (ops.length) {