Fix: Prevents duplicate listing of search results (#2306)

This commit is contained in:
Ludy 2024-11-23 12:37:13 +01:00 committed by GitHub
parent ad1cce378f
commit 9a96109ea2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ window.onload = function () {
// Show search results as user types in search box // Show search results as user types in search box
document.querySelector("#navbarSearchInput").addEventListener("input", function (e) { document.querySelector("#navbarSearchInput").addEventListener("input", function (e) {
var searchText = e.target.value.trim().toLowerCase(); // Trim whitespace and convert to lowercase var searchText = e.target.value.trim().toLowerCase(); // Trim whitespace and convert to lowercase
var items = document.querySelectorAll(".dropdown-item, .nav-link"); var items = document.querySelectorAll('a.dropdown-item[data-bs-tags]');
var resultsBox = document.querySelector("#searchResults"); var resultsBox = document.querySelector("#searchResults");
// Clear any previous results // Clear any previous results