Add focusOptions in conjunction with shouldFocusDOMNode
cohenmax9 opened this issue · comments
Is your feature request related to a problem? Please describe.
I need to leverage the preventScroll
prop of HTMLElement focus method in order to disable the default scrolling behavior.
Describe the solution you'd like
I am proposing adding a prop to init
named domNodeFocusOptions
in order to pass { preventScroll: true }
. This prop will only be relevant in conjunction with shouldFocusDOMNode
.
Example:
init({
shouldFocusDOMNode: true,
domNodeFocusOptions: {
preventScroll: true
}
})
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
I am handling the scrolling behavior manually in my app.
Hey @asgvard @predikament @Braggiouy! Apologies for being impatient, but I'd love to get some feedback on the above and see if you'd be willing to incorporate this change. I have a local branch where I have this built out, that I'd be happy to share. Thanks so much!
@cohenmax9 - having a similar problem and think this could be useful - thanks for finding a potential fix and submitting it!
@xavi160 would you be able to help out with my above request? It sounds like I'm not the only one encountering this issue. I would be happy to push up my branch and create a PR, but I do not have permissions to do so. Thank you!
@cohenmax9 Sorry for the delay in getting back to you. Most of our team is currently on leave. Could you please create a fork of the repository and make a PR from there? This way, we can see exactly what you are looking for and fully understand what is required.
Hi @Braggiouy! Thanks so much for your response! I went ahead and created a PR. Please let me know if you have any questions or suggestions. Thanks! #139
Hi @asgvard @predikament @Braggiouy @xavi160!
I am wondering if there's anything else you need from me to get #139 merged. I'd love to see this change incorporated as it is blocking progress on my app development.
Thanks!
Max
@cohenmax9 Hello!
Thanks for opening a PR with this change. Sorry for the slow response, a big part of the team has been on vacation.
The changes look relatively minimal, so I've pinged the team and we'll try to get this reviewed ASAP and get back to you.
Cheers