-
Notifications
You must be signed in to change notification settings - Fork 329
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
Dropped change() support #247
Comments
Moreover, it's impossible now to call element.change() from JS. Well it's possible but useless. |
Critical issue there, using dropkick should't destroy basic functionalities like that. $('select').dropkick({
change: function () {
$(this.data.select).change();
}
}); |
I couldn't think of a reasonable solution to this since it appeared to be jQuery specific. Upon closer inspection adding an event listener on the original select also did not trigger. Testing revealed that programatic changes to the select do not trigger the 'change' event on said select; so I've updated Dropkick's |
@softshape @Korri I'm going to close this ticket. If you guys have any other questions/concerns feel free to comment/reopen! |
Works perfectly now, thanks ! |
The latest Dropkick version dropped element.change(...) support. It used to work and I rely on it in production. For now the only documented way to process onChange event for the select is to call dropkick constructor with 'change' parameter.
On my site I style all the selects by default -
if($("select").length) {
$("select").dropkick();
}
So calling dropkick() again looks strange, especially as 'this' is pointed to different object. Should I rewrite all the select onchange handlers in my code? Or you plan to restore onchange support?
The text was updated successfully, but these errors were encountered: