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

mouseup outside a modal always closes it #1869

Closed
goldenstein64 opened this issue Feb 17, 2025 · 1 comment
Closed

mouseup outside a modal always closes it #1869

goldenstein64 opened this issue Feb 17, 2025 · 1 comment
Labels
Community This is a great issue for community members to work on 3️⃣ Low priority Contributions accepted, but Maybe team will not be working on this in the near term

Comments

@goldenstein64
Copy link

Releasing the mouse from outside a modal always closes it, even when the mouse was pressed from inside the modal. Dragging motions to the outside feel common with certain UIs like color pickers, so it would be annoying to close unintentionally, especially if there was more information written in a previous window.

category.flow.modal.mouseup.mp4

My thoughts are to make the modal view close iff the mouse was pressed and released from outside, something along the lines of a stopPropagation call / :stop action on the <dialog>'s only child and adding a flag to the modal controller that gets set on mouse down.

Originally posted by @goldenstein64 in #1857 (comment)

@zachgoll zachgoll added 3️⃣ Low priority Contributions accepted, but Maybe team will not be working on this in the near term Community This is a great issue for community members to work on labels Feb 21, 2025
zachgoll pushed a commit that referenced this issue Mar 3, 2025
* Replaced data-action click event with data-action mousedown to prevent the modal from hiding on mouse up whenever mouse down starts within the modal

* Changed click events to mousedown within dialog elements to trigger the closing of the element
@zachgoll
Copy link
Collaborator

zachgoll commented Mar 3, 2025

Fixed via #1931

@zachgoll zachgoll closed this as completed Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community This is a great issue for community members to work on 3️⃣ Low priority Contributions accepted, but Maybe team will not be working on this in the near term
Projects
None yet
Development

No branches or pull requests

2 participants