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

Unable to activate links or submit forms within FocusOn #3

Closed jimmynotjim closed 5 years ago

jimmynotjim commented 5 years ago

I have modals that contain links and forms (with some custom validation) that stopped working when I added FocusOn to them. Digging deeper, it appears this onClick listener that's passed to focus-lock is the culprit https://github.com/theKashey/react-focus-on/blob/master/src/component.tsx#L33. Unfortunately removing it causes any clicks within the modal to trigger a the onClickOutside callback.

Any tips for moving forward without having to add custom click handlers to everything?

theKashey commented 5 years ago

You did everything right. I am just going to fix it. Not a big deal - it's already working right for scroll events, I just need to replicate the same logic here.

jimmynotjim commented 5 years ago

Dang! Fastest response on an OSS project I've ever had. Thanks so much, you give me a point to strive for with my own projects. Let me know if there's anything I can help with, including testing any fixes.

theKashey commented 5 years ago

You just created the issue at the right time :) And quite severe to be honest.

theKashey commented 5 years ago

react-focus-on@2.0.1