Skip to content

Commit

Permalink
fix(search): disappearing thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed May 19, 2024
1 parent 63bf008 commit 4effbe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

const searchFormEl = document.getElementById("search-form"),
searchInputEl = document.getElementById("search-input"),
searchSugEl = document.getElementById("search-suggestions-container");
searchSugEl = document.getElementById("search-suggestions-container");

let focusedSuggestionIndex = 0;

function searchNoReload(searchQuery) {
searchSugEl.innerText = "";
searchFormEl.blur();
searchInputEl.blur();
const query = encodeURIComponent(searchQuery);
Expand All @@ -15,7 +16,6 @@ function searchNoReload(searchQuery) {
);
window.location.prevPath = prevPath;
window.history.pushState({}, "", `/search?query=${query}`);
searchSugEl.innerText = "";
}

searchFormEl.addEventListener("submit", (e) => {
Expand Down

0 comments on commit 4effbe8

Please sign in to comment.