Focus the last menu item on ArrowUp

With nothing focused yet, ArrowUp landed on the second to last item.
This commit is contained in:
Rūdolfs Ošiņš
2026-10-01 18:20:25 +02:00
parent 08057ba962
commit f0d4d678aa
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ export function menuFocusIndex(
case "ArrowDown":
return wrap(current + 1);
case "ArrowUp":
return wrap(current - 1);
return current === -1 ? count - 1 : wrap(current - 1);
case "Home":
return 0;
case "End":