Skip to content

Commit 42a72bc

Browse files
committed
fix: return focus to text input after cleared search
Some AT (VoiceOver included) does not automatically return focus to the input.
1 parent c31de95 commit 42a72bc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

static/js/table-search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function searchTable() {
1515
} else {
1616
clearInput.setAttribute('hidden', 'hidden');
1717
}
18-
18+
1919
trs.forEach((tr) => {
2020
let tds = tr.querySelectorAll('td');
2121
let firstCell = tds[0];
@@ -74,6 +74,7 @@ function inputClear() {
7474
let input = document.querySelector('#table-search-input');
7575
input.value = '';
7676
searchTable();
77+
input.focus();
7778
}
7879

7980
function clearAllFilters() {

0 commit comments

Comments
 (0)