react-focus-lock
react-focus-lock copied to clipboard
No initial focus
How do I use focus lock and having no input focused from start?
set autoFocus prop to false. It will suppress any active focus outside the lock, but not move it inside.
I tried that, and still the first input within FocusLock element get focused.
Also:
componentDidMount() { document.activeElement.blur(); }
dosen't do anything.
Check persistentFocus(default false) prop then - it will enforce something to be focused in any case.
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.