This commit is contained in:
Min Idzelis 2025-05-15 22:43:01 +00:00
parent 7a2c035299
commit 20f6b32119

View File

@ -27,7 +27,7 @@ export const moveFocus = (
// If no element is focused, focus the first matching element or the first focusable element
if (currentIndex === -1) {
const firstMatchingElement = focusableElements.find(selector);
const firstMatchingElement = focusableElements.find((element) => selector(element));
if (firstMatchingElement) {
firstMatchingElement.focus();
} else if (focusableElements[0]) {