Inertia: Browser support

Created on 18 Nov 2019  路  5Comments  路  Source: inertiajs/inertia

Hey folks,

I think it would be good to have browser support specified within the documentation.

Currently, I've found that unfortunately Inertia.js isn't working out of the box in IE 11 or MS Edge, mostly because missing Promise / scrollTo polyfills. I suppose this could be easily sorted out by including those polyfills out of the box within the package bundles.

What do you think?

Most helpful comment

Thanks for super quick response by the way :)

It happens everyone once in a while. 馃槀

Thanks so much for this @adriandmitroca, I'll add this to my higher priority list. 馃憤

All 5 comments

Interesting, I did not realize this. I would have expected Inertia.js to work with Edge. Is that on all versions? I feel like the library should be compatible with Edge out of the box. For IE11, I agree, a note in the docs would be smart.

What's required to make it compatible with Edge?

As for Edge, for sure scrollTo won't work.

Support: https://caniuse.com/#feat=mdn-api_scrolltooptions_top
Usage: https://github.com/inertiajs/inertia/blob/master/src/inertia.js#L132
Solution: Find out different way to scroll to the top of the page (maybe document.body.scrollTop? or polyfill: https://github.com/iamdustan/smoothscroll)

For IE11, simply Promise polyfill would totally do the job, so I would say that's not a big effort from package side, considering it is relatively hard to polyfill external vendor libraries and most people won't even realise this - unless support will be officially fully dropped.

Thanks for super quick response by the way :)

Thanks for super quick response by the way :)

It happens everyone once in a while. 馃槀

Thanks so much for this @adriandmitroca, I'll add this to my higher priority list. 馃憤

I got this error in Edge 18.18362:

TypeError: Object doesn't support property or method 'scrollTo'
  at Anonymous function (/js/app.js:2:136986)
  at Array.prototype.forEach (native code)
  at t.Inertia.setScroll (/js/app.js:2:136907)
  at Anonymous function (/js/app.js:2:136760)
  at Anonymous function (/js/app.js:2:10079)
...
(1 additional frame(s) were not displayed)

We have replaced scrollTo() with scrollTop, so that issue should be fixed.

We have also decided that we are not supporting IE11, which I've added to my documentation TODO list. 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sammagee picture sammagee  路  3Comments

reinink picture reinink  路  5Comments

reinink picture reinink  路  3Comments

sebastiandedeyne picture sebastiandedeyne  路  3Comments

philippkuehn picture philippkuehn  路  3Comments