Skip to content
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

Trigering change event fails on Internet Explorer #314

Closed
Korri opened this issue Nov 18, 2015 · 6 comments
Closed

Trigering change event fails on Internet Explorer #314

Korri opened this issue Nov 18, 2015 · 6 comments
Labels
Milestone

Comments

@Korri
Copy link
Contributor

Korri commented Nov 18, 2015

Looks like dispatchEvent does not work on Internet Explorer (on the 11 version at least), so the line this.data.select.dispatchEvent( new CustomEvent("change", {bubbles: this.data.settings.bubble})); fails with an error SCRIPT445 error.

Edit: Removed out of place example.

@Korri
Copy link
Contributor Author

Korri commented Nov 18, 2015

This solved it for me:

if ( !disabled ) {
  var evt = document.createEvent("HTMLEvents");
  evt.initEvent("change", this.data.settings.bubble, true);
  this.data.select.dispatchEvent(evt);
}

@Robdel12 Robdel12 added this to the v2.1.8 milestone Apr 19, 2016
@Robdel12
Copy link
Owner

Hey @Korri, I wasn't able to reproduce this error. Here's a small screen recording.

I'm going to close this but feel free to raise the issue again if you're still having the problem.

@loayza
Copy link

loayza commented Aug 12, 2016

I know this is old stuff but I just have the same issue, but in IE 10. Screenshot.

@Korri's tweak solves it.

@Robdel12
Copy link
Owner

Can you post what your dropkick constructor looks like?

@porchlight
Copy link

Ran into this issue today, which is the same as #321

Can confirm that @Korri 's code fixed it.

@Robdel12 Robdel12 reopened this Feb 14, 2017
@Robdel12
Copy link
Owner

Sorry for the late reply. Looks like #353 will clean this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants