theKashey / react-focus-on

🎯 Solution for WAI ARIA compatible modal dialogs or full-screen tasks, you were looking for
MIT License
336 stars 14 forks source link

Feature request: add possibility to pass other props to react-focus-lock and react-scroll-locky components #2

Closed smashercosmo closed 5 years ago

smashercosmo commented 5 years ago

Currently in my app I need to pass persistentFocus prop to react-focus-lock and noRelative prop to react-scroll-locky. Would it be possible to add either these extra props or possibility to pass all react-focus-lock and react-scroll-locky props?

theKashey commented 5 years ago

Not a problem. The only question - why you need especially these props? They both are a bit odd.

smashercosmo commented 5 years ago

Yes, you're right) After playing with it a bit more I came to conclusion, that I don't really need them)

smashercosmo commented 5 years ago

Thx for sowing the seeds of doubt in me) And for awesome package)

theKashey commented 5 years ago

Meanwhile - I am thinking about swapping scroll-lock with remove-scroll. The second one is smaller, friendly to portals, but does not prevent clicks outside of a lock - it could prevent only event bubbling, hence you will have to "drop a shadow" behind modal/lock.

It is ok for you?