theKashey / react-focus-lock

It is a trap! A lock for a Focus. 🔓
MIT License
1.25k stars 66 forks source link

Typo in readme #307

Open richsoni-spotify opened 2 months ago

richsoni-spotify commented 2 months ago

whiteList=fn you could whitelist locations FocusLock should carry about. Everything outside it will ignore. For example - any modals.

Should read "care" about

richsoni-spotify commented 2 months ago

Two more:

In some cases the original node that was focused before the lock was activated is not the desired node to return focus to. Some times this node might not exists at all.

should be "might not exist"

first of all, FocusLock need a moment to record this node, please do not hide it onClick, but hide onBlur (Dropdown, looking at you)

should be "FocusLock needs a moment"

richsoni-spotify commented 2 months ago

Another:

second, you may specify a callback as returnFocus, letting you decide where to return focus to.

"Specify callback to returnFocus"