🐛 fix(search): restore highlighting functionality (#401)

main
Óscar 5 months ago committed by GitHub
parent fc04ab4e40
commit 17694ba3d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2942,13 +2942,13 @@ window.onload = function () {
searchInput.addEventListener(
'input',
async function () {
const searchInput = this.value;
const searchTerm = searchInput.trim();
const inputValue = this.value;
const searchTerm = inputValue.trim();
const searchIndex = await searchIndexPromise;
results.innerHTML = '';
// Use the raw input so the "clear" button appears even if there's only spaces.
clearSearchButton.style.display = searchInput.length > 0 ? 'block' : 'none';
clearSearchButton.style.display = inputValue.length > 0 ? 'block' : 'none';
resultsContainer.style.display = searchTerm.length > 0 ? 'block' : 'none';
// Perform the search and store the results.

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save