Closed mikekiska closed 1 year ago
Just to confirm - this logic became a little complicated. One of the reasons why returnFocus
also accepts a function - to handle focus/return/autofocus race conditions.
Probably it's time to really review how this moment works.
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.
When using
autoFocus
to focus an element within a<FocusLock returnFocus>...</FocusLock>
focus is only returned using certain versions of react-focus-lock. Examples:autoFocus
autoFocus
autoFocus
focus is returned in this versionSteps to reproduce with first 2.7.1 example above:
A second test with 2 modals:
A third test with 2 modals:
This may be related to these issues: