diff --git a/src/home/rendering/setup-keyboard-navigation.ts b/src/home/rendering/setup-keyboard-navigation.ts index e186ba4b..a7bc65db 100644 --- a/src/home/rendering/setup-keyboard-navigation.ts +++ b/src/home/rendering/setup-keyboard-navigation.ts @@ -16,17 +16,6 @@ export function setupKeyboardNavigation(container: HTMLDivElement) { container.addEventListener("mouseover", () => disableKeyBoardNavigationCurried); isMouseOverListenerAdded = true; } - - const filterTextbox = document.getElementById("filter") as HTMLInputElement; - filterTextbox.addEventListener("input", () => { - const filterText = filterTextbox.value.toLowerCase(); - const issues = Array.from(container.children) as HTMLDivElement[]; - issues.forEach((issue) => { - const issueText = issue.textContent?.toLowerCase() || ""; - const isVisible = issueText.includes(filterText); - issue.style.display = isVisible ? "block" : "none"; - }); - }); } function disableKeyboardNavigationCurry() { diff --git a/src/home/sorting/sorting-manager.ts b/src/home/sorting/sorting-manager.ts index 271e6103..ae065d09 100644 --- a/src/home/sorting/sorting-manager.ts +++ b/src/home/sorting/sorting-manager.ts @@ -25,6 +25,18 @@ export class SortingManager { textBox.type = "text"; textBox.id = "filter"; textBox.placeholder = "Text Filter"; + + const issuesContainer = document.getElementById("issues-container") as HTMLDivElement; + textBox.addEventListener("input", () => { + const filterText = textBox.value.toLowerCase(); + const issues = Array.from(issuesContainer.children) as HTMLDivElement[]; + issues.forEach((issue) => { + const issueText = issue.textContent?.toLowerCase() || ""; + const isVisible = issueText.includes(filterText); + issue.style.display = isVisible ? "block" : "none"; + }); + }); + return textBox; } @@ -43,7 +55,6 @@ export class SortingManager { }); return buttons; - // this._filters.appendChild(labels); } private _createRadioButton(option: string): HTMLInputElement { diff --git a/static/style/style.css b/static/style/style.css index 5926b66f..fdefd5bf 100644 --- a/static/style/style.css +++ b/static/style/style.css @@ -282,7 +282,6 @@ display: inline-flex; text-align: left; margin: 0 16px; - cursor: pointer; } #authenticated > * { display: inline-flex;