-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Align select item event with native <select> #1586
Comments
If I remember correctly, reorganizing the 'mousedown' event listeners helped fix this. selectize adds multiple 'mousedown' event listeners that, when combined into a single listener, makes it easier to control event bubbling in situations like this. These two 'mousedown' listeners: Can be combined into a single listener. Here's what it looks like in Tom Select: jsfiddle example using Tom Select Hope this helps |
Hey @oyejorge ! Nice work with Tom Select 😍 Maybe it's worth joining the collaborator team and merging your project in here with the intention of releasing a new major version? |
Thanks, I'm not opposed. Reached out a while ago but felt like the best way for me to accomplish what I wanted was to work on my fork. Probably not the right place to talk about this, but let know if there's anything about the current state of Tom Select that wouldn't work or still needs work for a new major version. |
@oyejorge come chat https://keybase.io/team/selectize :) |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days |
I did:
Selectize does not respect the default behaviour of a
<select>
element when selecting an item. It uses amousedown
event rather thanclick
. This deviation from the default causes issues with libraries which respect the default, for example Sweetalert2. See below issue for further context.Steps to reproduce:
See jsfiddle @ sweetalert2/sweetalert2#2154 (comment)
Expected result:
Swal should not close
Actual result:
Swal closed
The text was updated successfully, but these errors were encountered: