shepherd: IE11 support is broken
The README.md states that Shepherd still supports IE11, but the dist and demo (latest beta) give JavaScript errors. So Shepherd doesn’t work with IE11 right now.
Is there a way to fix these issues or build Shepherd with IE11 support? There are still a lot of IE11 users on our platform (> 10%).
The lambda’s are definitely breaking for IE11, see following example:
// returns true if 'el' should be allowed to receive touchmove events
const allowTouchMove = el => locks.some(lock => {
if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {
return true;
}
return false;
});
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 34 (21 by maintainers)
Commits related to this issue
- Transpile dependencies for IE11 support Fixes #437 — committed to shepherd-pro/shepherd by RobbieTheWagner 5 years ago
@rubnig apologies, at some point yesterday, I had removed all the arrow functions, I added a new dep,
auto-bindwhich seems to use them, and had to add that to the list for what is being transpiled.I think, in most cases, people developing apps will be already including some sort of polyfills for IE11 support. Perhaps we should provide our own, and document that you should use it by itself, if you do not have a modern web app setup with babel and polyfills already, but if you are already adding core-js or other polyfills, reusing them and not including our file would probably be better.
@yonkov one of the 6.x or 7.x versions should work, but they also required polyfills. Our stance is to not support IE at all because Microsoft even has dropped support for it.
@rwwagner90 Thanks i tried it and it works, here’s the polyfills that i have used if anyone needs it : https://polyfill.io/v3/polyfill.min.js?features=Promise%2CObject.assign%2CArray.from%2CArray.prototype.fill%2CObject.getOwnPropertyDescriptors
Cheers.
I think perhaps the easiest thing to do, might be to do a separate build and generate
shepherd.ie11.jsandshepherd.ie11.polyfill.js, that way the standardshepherd.min.jsdoes not have the 11 kb min + gzip added to it that we need for IE11 support.Oh, I see, I think this is from Tippy perhaps. Let me check our Babel config.