diff --git a/src/assets/js/search.js b/src/assets/js/search.js index 52be89a9a..8830f56ab 100644 --- a/src/assets/js/search.js +++ b/src/assets/js/search.js @@ -24,9 +24,16 @@ const resultsLiveRegion = document.querySelector( ); const searchInput = document.querySelector("#search"); const searchClearBtn = document.querySelector("#search__clear-btn"); +const poweredByLink = document.querySelector(".search_powered-by-wrapper"); let activeIndex = -1; let searchQuery; +if (poweredByLink) { + poweredByLink.addEventListener("focus", function () { + clearSearchResults(); + }); +} + //----------------------------------------------------------------------------- // Helpers //-----------------------------------------------------------------------------