-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
dropdown_input: 2 instances on same page seem to interfere with each other #180
Comments
Which version of Tom Select are you using? And what browser are you seeing this in? |
I'm using 2.0.0 Beta 3 and Chrome, but you're right, I can't seem to duplicate it in jfiddle either. There's definitely some weird interaction between the dropdown_input, Stimulus.js, and Bootstrap, but I'll keep trying to track it down. If one of the two instances is in a modal, I can even get Bootstrap to crap out a bunch of error messages about having overflowed the stack, but even without the modal, two of them behave weird. |
Maybe it has something to do with remote loading. I duplicated it with this: |
Hmm, ok, I see what you're talking about. Interestingly, it does only appear to be an issue in chrome |
It effects Safari a little bit too; in Safari, clicking on one dropdown makes the other one flicker open then closed right away, but at least it doesn't stay open. |
Pretty sure it's fixed with that last change. |
Duplicating the change into my environment seems to have solved it for me at least! Thank you! |
Awesome, thanks for checking! |
you to check if value of option don't empty ! |
I am using Bootstrap 4 and have two instances of the control in the same document that are instantiated by a Stimulus.js controller like this:
If I don't use the "dropdown_input" plugin, the two instances behave appropriately. However, if I use the plugin, the two seem to "interfere" with each other, in that opening or closing the dropdown on one of them causes the other one to open or close.
In addition, the actual dropdown input seems to only be present in the second instance.
The text was updated successfully, but these errors were encountered: