Skip to content

Commit

Permalink
Force close of search box after item selection
Browse files Browse the repository at this point in the history
In Firefox, for some reason selecting an item with the mouse would not
clear the search overlay. It appears that it would generally clear when
the blur function is called, but something appears to be different when
selected by mouse vs enter key.

This forces a call to `this.close()` to close the dialog without relying
only on the blur action.

Fixes #263
  • Loading branch information
ViViDboarder committed Jan 31, 2020
1 parent 87de5a7 commit d034f13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default {
onItemSelect() {
this.$refs.searchInput.$el.blur();
this.clear();
this.close();
},
clear() {
this.query = "";
Expand Down

0 comments on commit d034f13

Please sign in to comment.