diff --git a/docs/src/_includes/components/search.html b/docs/src/_includes/components/search.html index 37a71361dddb..9635900f7529 100644 --- a/docs/src/_includes/components/search.html +++ b/docs/src/_includes/components/search.html @@ -9,11 +9,18 @@

Results will be shown and updated as you type.

+
+
- Powered by + Powered by
- +
-
+ diff --git a/docs/src/assets/js/search.js b/docs/src/assets/js/search.js index a7d0225c3011..3fc6e65578cf 100644 --- a/docs/src/assets/js/search.js +++ b/docs/src/assets/js/search.js @@ -22,6 +22,7 @@ const resultsElement = document.querySelector('#search-results'); const resultsLiveRegion = document.querySelector('#search-results-announcement'); 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; @@ -210,6 +211,12 @@ if (searchClearBtn) searchClearBtn.setAttribute('hidden', ''); }); +if (poweredByLink) { + poweredByLink.addEventListener('focus', function () { + clearSearchResults(); + }); +} + document.addEventListener('keydown', function (e) { const searchResults = Array.from(document.querySelectorAll('.search-results__item')); diff --git a/docs/src/assets/scss/components/search.scss b/docs/src/assets/scss/components/search.scss index 0ab8138861a3..4d633956970a 100644 --- a/docs/src/assets/scss/components/search.scss +++ b/docs/src/assets/scss/components/search.scss @@ -74,7 +74,7 @@ padding: 10px 6px 0 0; align-items: center; - .powered-by-text { + .powered_by-text { color: var(--body-text-color); margin-right: 5px; margin-top: -2px;