diff --git a/frontend/src/components/UI/Dialogs/SearchDialog.vue b/frontend/src/components/UI/Dialogs/SearchDialog.vue index c45dbf9ae276..7d57e0383d1a 100644 --- a/frontend/src/components/UI/Dialogs/SearchDialog.vue +++ b/frontend/src/components/UI/Dialogs/SearchDialog.vue @@ -136,16 +136,18 @@ export default { this.$emit(SELECTED_EVENT, recipe); }, onUpDown(e) { - if (e.keyCode === 38) { - e.preventDefault(); - this.selectedIndex--; - } else if (e.keyCode === 40) { - e.preventDefault(); - this.selectedIndex++; - } else { - return; + if (this.dialog) { + if (e.keyCode === 38) { + e.preventDefault(); + this.selectedIndex--; + } else if (e.keyCode === 40) { + e.preventDefault(); + this.selectedIndex++; + } else { + return; + } + this.selectRecipe(); } - this.selectRecipe(); }, resetSelected() { this.searchString = ""; @@ -169,4 +171,4 @@ export default { \ No newline at end of file +