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

Selecting an option from the dropdown triggers parent elements click event handlers #387

Open
raphael-yapla opened this issue Dec 19, 2023 · 1 comment

Comments

@raphael-yapla
Copy link

raphael-yapla commented Dec 19, 2023

Version

  • Vue version: 3

Description

Very similar to #182, it seems the option elements in the dropdown are using the mousedown event instead of click resulting in involuntary triggering of parent elements when selecting an option. This is a very frustrating problem when using it in modals or stuff that can be closed by clicking on the parent element.

Other related issues: #323 and #295

Demo

https://jsfiddle.net/9ez4pk5j/53/

There's a click event bound to the blue zone, when selecting an option that's above it, it will trigger the event, when clicking on the red zone, nothing happens as expected.

raphael-yapla added a commit to Yapla-Labs/multiselect that referenced this issue Dec 19, 2023
@raphael-yapla
Copy link
Author

raphael-yapla commented Dec 19, 2023

Tried to see if simply replacing all of the mousedown by click events would work but unfortunately although the unit tests are still working in my project the dropdown no longer opens. I'm happy to help but I think I'll need some pointers (badum tss).

I'm also not sure of how to build it properly, I'm getting some errors because of vue dependencies conflicts. Is there a contributing guide available?

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

1 participant