Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to activate links or submit forms within FocusOn #3

Closed
jimmynotjim opened this issue Apr 10, 2019 · 4 comments
Closed

Unable to activate links or submit forms within FocusOn #3

jimmynotjim opened this issue Apr 10, 2019 · 4 comments

Comments

@jimmynotjim
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

theKashey added a commit that referenced this issue Apr 10, 2019
fix: dont prevent internal clicks, fixes #3
@theKashey
Copy link
Owner

[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants