diff --git a/_assets/js/search.js b/_assets/js/search.js index 04ba39a28..0ad80ea10 100644 --- a/_assets/js/search.js +++ b/_assets/js/search.js @@ -145,7 +145,7 @@ return text.replace(new RegExp('(\\b)(' + words.join('|') + ')(\\b)','ig'), '$1$2$3'); }; - window.initializeAutocomplete = function (autocompleteContainer, defaultValue) { + window.initializeAutocomplete = function (autocompleteContainer) { const previousInput = autocompleteContainer.querySelector('input'); autocompleteContainer.innerHTML = ''; let runningRequest = null; @@ -160,7 +160,6 @@ element: autocompleteContainer, id: 'search-box', name: 'query', - defaultValue: defaultValue, placeholder: previousInput.getAttribute('placeholder'), confirmOnBlur: false, onConfirm: (item) => { diff --git a/search/index.html b/search/index.html index f162e4e70..c070974cb 100644 --- a/search/index.html +++ b/search/index.html @@ -65,7 +65,7 @@

${highlight(result.title)}

window.addEventListener('DOMContentLoaded', () => { const autocompleteContainer = document.querySelector('.autocomplete_container'); - window.initializeAutocomplete(autocompleteContainer, query); + window.initializeAutocomplete(autocompleteContainer); const highlightSearchTerms = !routedFrom; window.SearchService(query, highlightSearchTerms).then((response) => {