fix: focus-typing was working with unicode
Massimo Melina committed
Oct 30, 2024 at 17:24 UTC
39bb325f512b9114b6597aae75ec3837a8c7746d
1 file changed
+1
-1
frontend/src/BrowseFiles.ts
+1
-1
@@ -116,7 +116,7 @@ function FilesList() {
116
})
117
const focusIndex = useMemo(() => {
118
if (!focus) return -1
119
- const match = (x: typeof theList[0]) => x.name.toLocaleLowerCase().startsWith(focus)
119
+ const match = (x: typeof theList[0]) => x.name.toLocaleLowerCase().normalize().startsWith(focus)
120
const inThisPage = thisPage.findIndex(match) // first attempt within this page
121
if (inThisPage >= 0)
122
return inThisPage + offset