Skip to content

Commit ff9a434

Browse files
committed
improve a11y, keyboard nav, and input responsiveness
1 parent a5ee9b5 commit ff9a434

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/widgets/peopleSearch.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export const createPeopleSearch = function (
295295
visibleCount += 1
296296
}
297297
}
298-
sortVisibleRows()
298+
scheduleSortVisibleRows()
299299
ensureActiveRowIsVisible()
300300
return visibleCount
301301
}
@@ -617,8 +617,18 @@ export const createPeopleSearch = function (
617617
: 'No contacts match that name.')
618618
}
619619

620+
let inputSearchQueued = false
620621
const onInputHandler = function () {
621-
void runSearch(searchInput.value)
622+
if (inputSearchQueued) {
623+
return
624+
}
625+
inputSearchQueued = true
626+
627+
const flushInputSearch = function () {
628+
inputSearchQueued = false
629+
void runSearch(searchInput.value)
630+
}
631+
setTimeout(flushInputSearch, 0)
622632
}
623633

624634
const onFocusHandler = function () {

0 commit comments

Comments
 (0)