Closed Bruceeeeeee closed 1 year ago
AutoFocusInside
is marking something inside it as 'focus if there is no other option'.
MoveFocusInside
is a command, moves focus to the first focusable inside it on mountCan you clarify the desired behavior? You've provided some information about how it is not working, but how it should work?
Hi, I think the desired behavior should be when we set autoFocus=false, it shouldn't focus automatically even the focus is outside the lock. To implement this behavior, maybe there could be a 'disabled' props for AutoFocusInside to disable the initial auto focus?
No, this is not how Lock works:
enabled={false}
and deactivate lock at all.
Focus
events inside the Lock and activate it once focus is inside and should be managed.autofocus
controls only what will be focused. Without it enabled you are expected to do something onActivation
, and FocusLock will not interfere.
This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.
In my case we use FocusLock and AutoFocusInside for dialog. `
` in some cases like opening dialog by clicking the dropdown menu item, while the dialog is rendering, menu will also do some sth like ref.focus. In this case, autoFocus={false} not working, it will still focus the first available element.
I tried the disabled props in AutoFocusInside, also not working