-
Notifications
You must be signed in to change notification settings - Fork 132
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
onChange events are shared between instance of selectOrDie #17
Comments
I'm on it! |
@phbou72 @vestman This is not because of selection from second dropdown. Just click anywhere else and the event will be triggered. A possible hack/workaround I am using is this : http://jsfiddle.net/oktg53kv/ |
Ok. Clicking elsewhere does trigger the event. But, that still point out a bug in my opinion. Why is the onChange event triggered multiple type? Why not only when we select a new option? I should not need to use a closure to check if a new option has been selected. |
I've fixed this issue guys: Add this after line 384: _private.blurSod($sod); @phbou72 @vestman @swapnilmishra // all : please ignore the above fix. It does fix the described behaviour, however it peaks my CPU usage completely and results in a hanging browser. Would you check this out @vestman ? Thanks 👍 As far as I can see, the element should be unfocussed after selecting a new one. At the moment, this doesn't happen and when you click outside of the dropdown the event gets fired again. Adding the line above fixed it - but results in a conflict with the rest of the plugin (seems to be some kind of endless loop). Hope it helps, would be great to get it fixed 👍 |
Fixed, thanks for pointing this out, @phbou72! Since you're using the selectordie.min.js from vst.mn as an external resource you can check your original fiddle - http://jsfiddle.net/Ls3mcvLu/6/ - to check that it's working. |
👍 thanks @vestman |
Thanks a lot @vestman! It work perfectly! |
I made a little jsFiddle to explain the bug : http://jsfiddle.net/Ls3mcvLu/6/
Select something on the first select. The onChange event is triggered as expected.
Then, select something on the second dropdown. The second dropdown trigger the onChange event and show the value selected on the first select? Notice there is no listener for the event on the second dropdown?
The text was updated successfully, but these errors were encountered: