Closed dylanfpaul closed 1 year ago
Without autofocus enabled it will be kept "as is" and corresponding logic will be fired only on focus change. It should not take two tabs, but there are no guarantees that the first element will be focused on activation - actually with more probability it will be the last.
This is how internal logic works - it compares activeElement
and FocusLock
boundaries and if focus is found "before" it thinks you did shift+tab
Long story short - can you please clarify your use case?
I'm having the same issue and hopefully can elaborate a little.
We have a drawer component that uses FocusOn needs to load on pageload. There are 2 buttons in this drawer.
First case
Second case
Third case
autoFocus
prop set to false
Drawer load automatically on page load and have no buttons outlined until a user hits tab once.
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.
Is this the expected behaviour? Is there a way to not automatically focus and also only take 1 tab press to start focusing something?