mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-16 00:42:32 -05:00
Allow arrow keys to function when SearchDialog is not open (#777)
This commit is contained in:
@@ -136,16 +136,18 @@ export default {
|
|||||||
this.$emit(SELECTED_EVENT, recipe);
|
this.$emit(SELECTED_EVENT, recipe);
|
||||||
},
|
},
|
||||||
onUpDown(e) {
|
onUpDown(e) {
|
||||||
if (e.keyCode === 38) {
|
if (this.dialog) {
|
||||||
e.preventDefault();
|
if (e.keyCode === 38) {
|
||||||
this.selectedIndex--;
|
e.preventDefault();
|
||||||
} else if (e.keyCode === 40) {
|
this.selectedIndex--;
|
||||||
e.preventDefault();
|
} else if (e.keyCode === 40) {
|
||||||
this.selectedIndex++;
|
e.preventDefault();
|
||||||
} else {
|
this.selectedIndex++;
|
||||||
return;
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.selectRecipe();
|
||||||
}
|
}
|
||||||
this.selectRecipe();
|
|
||||||
},
|
},
|
||||||
resetSelected() {
|
resetSelected() {
|
||||||
this.searchString = "";
|
this.searchString = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user