-
Notifications
You must be signed in to change notification settings - Fork 46
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
legacy IE bug with change events #7
Comments
Thanks for the ticket. It seems the change event does not bubble in old IE http://stackoverflow.com/questions/265074/does-the-onchange-event-propagate I will see if this is something I can handle in gator In the mean time you could try binding directly to the element Gator(document.getElementById('someid')).on('change', function() {
// do something
}); |
So I was just looking into this. Binding directly to the element is definitely the best solution for now. I will try to get this added to Gator, but legacy IE support is not super high priority since this library was really designed with modern browsers in mind. In order to implement I would have to change the way some things work in Gator itself. For reference I was just looking at the jQuery source to see how they handle this and it looks like they do something where they listen for For selects, inputs, and other form elements they attach a click event and then once the click bubbles up they attach a change event to the target element the click came from (so it is lazy loaded). Once the change event is attached to the element it does not attach it again on subsequent clicks. Once the change fires on the target it simulates a change event. |
According to http://caniuse.com/matchesselector it doesn't work in oldIE, and in the code, the polyfill |
@tomasdev there is a legacy.js file that adds some of the old ie functionality, it is specifically the change event that doesn't work: https://github.com/ccampbell/gator/blob/master/plugins/gator-legacy.js |
For some reason change events are not firing in IE8 and below:
Gator(document).on('change', '#someid', function(e) {
//do something -
});
click works tho.
The text was updated successfully, but these errors were encountered: