Add explicit focusOptions support for ReactFocusLock#63
Add explicit focusOptions support for ReactFocusLock#63theKashey merged 2 commits intotheKashey:masterfrom cee-chen:master
focusOptions support for ReactFocusLock#63Conversation
|
Hey. Thank you for your contribution and the wonderful debugging journey. Wondering what would be the best approach here:
One of the reasons to prefer more abstract solutions - easier to correct "default behaviour" on a major version bump. Thoughts? |
|
I think I'd lean towards a boolean to match native behavior over a Totally understand the difficulties of balancing flexibility vs abstraction. I can update my PR on Monday with whatever API you prefer. |
|
Proposal sounds reasonable. What about actually matching underlying primitive as |
|
I'm good either way! I pushed up the |
|
Thanks a million! I don't have merge/write access to merge the PR as a heads up. |
|
Released in |
closes #62
As of 2.7.0, react-focus-lock has supported a
focusOptionsprop, primarily for allowing consumers to passpreventScrollto the initial focus event. react-focus-on unfortunately has not exposed passing that prop directly toreact-focus-lock, which potentially leads to scroll jumping issues that cannot be overridden (see theKashey/react-focus-lock#162 for more info).I looked but couldn't see any meaningful unit tests to write/update to include this new prop - please feel free to ping me if there are!