ghosh / Micromodal

⭕ Tiny javascript library for creating accessible modal dialogs
https://micromodal.now.sh/
MIT License
3.54k stars 230 forks source link

Micromodal isn't defined (Only in IE11) #247

Closed itailitai closed 4 years ago

itailitai commented 5 years ago

The library works great on every browser except Internet explorer. I get the following error:

MicroModal is not defined

in the follwing code:

<script src="js/micromodal.min.js"></script>
<script>

MicroModal.init({

  openTrigger: 'data-custom-open',
  closeTrigger: 'data-custom-close'

});

</script>

whereas in every other browser I get no errors whatsoever, everything works flawlessly . I included some polyfills but still the issue persists.

ghosh commented 5 years ago

Thanks for opening this issue. Will look into it it.

vaskar-nepal commented 5 years ago

Hi,

Any update on this issue? Is their any timeline set for this issue.

Thanks!

Twilliamson90 commented 4 years ago

This is due to the production minified library containing arrow functions. Arrow functions are not supported by IE 11. In the short term, people can use v0.4.0 of this library which does not use the arrow functions. If the author plans to keep IE 11 support then the babel config will need to be updated to transform arrow functions.