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

Fix for Modal Closing when Input is Focused #190

Merged
merged 3 commits into from
Aug 10, 2021
Merged

Conversation

fabrego524
Copy link
Collaborator

@fabrego524 fabrego524 commented Aug 10, 2021

This should apply a fix for #160, the modal now checks if the Input is being focused or not.

It seems this solution

onClick={focus ? undefined : onClose}

will work, although I'm not sure if there is a better way of doing this. Opinions or feedback on this would be great.

@fabrego524 fabrego524 added bug Something isn't working app Work for frontend app stretch Stretch project for Scarlet Data Studio interns. labels Aug 10, 2021
Copy link
Contributor

@vingkan vingkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, Fabian! I just pulled the branch to test the fix and it works as expected. Great fix.

@fabrego524 fabrego524 merged commit 81dc6cb into main Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Work for frontend app bug Something isn't working stretch Stretch project for Scarlet Data Studio interns.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modal closes when click ends outside of modal, even if input is focused.
2 participants