search: Always select search bar text when initiating search.

This reverts part of cb04ae1f95 that
nobody understands the purpose of, and fixes this case.
This commit is contained in:
Evy Kassirer 2023-09-27 10:24:55 -07:00 committed by GitHub
parent e1aca65d7d
commit aa8d3a0c6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -183,13 +183,7 @@ export function initiate_search() {
// Open the typeahead after opening the search bar, so that we don't
// get a weird visual jump where the typeahead results are narrow
// before the search bar expands and then wider it expands.
if (!$("#searchbox .dropdown-menu").is(":visible")) {
$("#search_query").typeahead("lookup");
}
if (!search_bar_already_open) {
$("#search_query").typeahead("lookup").trigger("select");
}
$("#search_query").typeahead("lookup").trigger("select");
}
export function clear_search_form() {