Skip to content

Commit

Permalink
Merge pull request #10491 from cdrini/fix/auto-autocomplete-results
Browse files Browse the repository at this point in the history
Fix autocomplete results showing up on pageload
  • Loading branch information
jimchamp authored Feb 21, 2025
2 parents 7c5bdb7 + 51ef9b9 commit 0af88bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openlibrary/plugins/openlibrary/js/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ export class SearchBar {
const text = this.$facetSelect.find('option:selected').text();
$('header#header-bar .search-facet-value').html(text);

// Add immediate refresh when input has value
if (this.$input.val()) {
// Add immediate refresh when input has value and focus is on the facet selector
if (this.$input.val() && this.$facetSelect.is(':focus')) {
this.renderAutocompletionResults();
}
}
Expand Down

0 comments on commit 0af88bc

Please sign in to comment.