Jss: IE 11 injection order is wrong

Created on 1 Jan 2019  路  8Comments  路  Source: cssinjs/jss

__Expected behavior:__
IE 11 behaves as the other browsers.

__Describe the bug:__
IE 11
capture d ecran 2019-01-01 a 15 52 44

The other browsers
capture d ecran 2019-01-01 a 15 52 52

This is a v10 regression. It was first reported in https://github.com/mui-org/material-ui/issues/14045.

__Codesandbox link:__
https://codesandbox.io/s/z2k5o54p5m

__Versions (please complete the following information):__

  • jss: v1.0.0-alpha.5
  • Browser: IE 11
bug high important

All 8 comments

I have found the source of the issue. It's linked to a change of the inject and deploy order.
In JSS v9 (deploy > insertBefore)

capture d ecran 2019-01-01 a 18 21 27

In JSS v10 (insertBefore > deploy)

capture d ecran 2019-01-01 a 18 18 28

So fixing the issue should be a matter of inverting the call order. I have hacked it on my local build. it works.

The regression comes from https://github.com/cssinjs/jss/pull/857

I have tried running that example on IE11, I get errors, how did you test it there? Looks like the errors are from codesandbox.

@kof It's related to https://github.com/CompuIves/codesandbox-client/issues/1187. Codesandobx broke the IE 11 support at some point. I have used a naked project, something like CRA or Next.js. Maybe you can use the JSS documentation website?

Interesting, actual source order of style tag is correct.

screen shot 2019-01-02 at 00 06 46

funny, order in which we insert style tags takes precedence over their position in the dom

@oliviertassinari published 10.0.0-alpha.7, let me know if it worked for you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HenriBeck picture HenriBeck  路  4Comments

goleary picture goleary  路  5Comments

brianmhunt picture brianmhunt  路  5Comments

oliviertassinari picture oliviertassinari  路  4Comments

dan-lee picture dan-lee  路  3Comments