Allow `.focus()` to take standard options. (`preventScroll`, `focusVisible`)
Is there an existing request?
- [X] I have searched for this request
Describe the feature request
Reason for Feature Request
When focusing a text input on Safari, it will automatically scroll to the text input. If there is already an animated scroll in progress, the Safari scroll will interrupt the in-progress scroll and scroll to the text input.
The workaround appears to be to call focus like this: textInput.focus({preventScroll: true}). This however, does not seem to have any effect.
Research
With my limited knowledge, I investigated the focus call through react-native code and it appeared that any arguments provided would not be passed on to the focus event that is emitted.
Expectation
When calling textInput.focus({preventScroll:true}); that the options argument provided to .focus(options) is passed along to the browser for handling as per standard focus specification.
:warning: This issue is missing required fields. To avoid this issue being closed, please provide the required information as described in the ISSUE TEMPLATE.
This should have been reported as a bug an included a reproducible test case
The ISSUE TEMPLATE link above is broken. Our scenario was somewhat tightly tied to our implementation, so it may take a bit of time to prepare a reproduction for you.
This is something I'd like to fix, I just can't track down the offending code paths off the top of my head without a test case. Here's the sandbox template for creating issue test cases: https://codesandbox.io/s/6lx6ql1w5r