Selects with dropkick applied do not bubble change events correctly
jamesnw opened this issue · comments
Expected behavior- Selects would bubble change events in the same way whether or not they have dropkick applied.
Discovered behavior- Selects with dropkick applied calls the change event for the select itself, but nothing above.
I was not able to get a JSFiddle working with dropkick, so here is an html file that demonstrates what I'm experiencing-
http://up.jamesnweber.com/_sandbox/dropkick/index.html (gist at https://gist.github.com/jamesnw/f98fe067a48ac2922143)
If you change the select with dropkick applied, the change event is only called on the select, and then it stops.
If you change the select without dropkick applied, the change event bubbles up correctly.
I was able to make things work with the following code-
$('select').dropkick({'change':function(){
$(this.form).find('select').change();
}});
However, this isn't perfect, as it calls change on the select, bubbles correctly, and then calls change on the select again, but this time it doesn't bubble. Is there a better way of doing this?
Cool. I'll close it :)
Thanks for addressing this in a more robust way than my workaround! (And sorry for the duplicate issue)