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

Modal closes when click ends outside of modal, even if input is focused. #160

Open
vingkan opened this issue Aug 2, 2021 · 0 comments · Fixed by #190
Open

Modal closes when click ends outside of modal, even if input is focused. #160

vingkan opened this issue Aug 2, 2021 · 0 comments · Fixed by #190
Assignees
Labels
app Work for frontend app bug Something isn't working stretch Stretch project for Scarlet Data Studio interns.

Comments

@vingkan
Copy link
Contributor

vingkan commented Aug 2, 2021

Description

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

This is a bug in the sense that it is disruptive to the user. It's not an edge case that we anticipated, but that doesn't make it not a bug. That being said, it may be tricky to fix and is not super high priority, so we don't have to fix it now.

To Reproduce

  • Go to scatter view or timeline view
  • Click metric selector to open modal
  • Type something in search bar
  • Drag mouse to highlight the search bar contents
  • Release mouse drag outside of modal
  • Modal will close

Recording showing example:

https://www.loom.com/share/8afac30dc06f41abbaba11ae064924f5

Expected Behavior

Modal should not close while input is focused.

Suggested Solution

Add a state variable to keep track of whether the input is focused. This should capture when someone is typing in the input as well as when they are highlighting content in the input. If the input is focused, do not close the modal.

@vingkan vingkan added bug Something isn't working app Work for frontend app stretch Stretch project for Scarlet Data Studio interns. labels Aug 2, 2021
@fabrego524 fabrego524 linked a pull request Aug 10, 2021 that will close this issue
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 a pull request may close this issue.

2 participants