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

Stop mousedown event propogation when calling toggle #1507

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

paullegrand
Copy link

Mousedown event propagation is not stopped in all cases: only currently when you click the "caret" icon. This makes all mousedown events also stop propogation.

This was found to cause strange behavior in cases where other components were also listening for mousedown events. For example, the Vue Headless UI Dialog from Tailwind also uses a mousedown event, and not stopping propagation was causing the modal to close any time the multiselect component was clicked without .stop on the mousedown event.

I didn't include a reproduction link because the caret already has .stop on the propagation and this makes it consistent, but please let me know if you would like one.

@bikegriffith
Copy link

Upvote for this fix. Would love to see this make it in a release ASAP!

@mattelsey-boxcast
Copy link

+1 for this fix

@bikegriffith
Copy link

@paullegrand There are a handful of other @mousedown.prevent events missing the .stop in this file. One of them causes this same issue when clicking the "X" for the multiselect case. Are you able to this change to add .stop to all instances?

@igoohd
Copy link

igoohd commented Apr 12, 2024

+1 for this fix

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

Successfully merging this pull request may close these issues.

4 participants