Gatsby: onInitialClientRender not called on IE10

Created on 6 Feb 2019  路  6Comments  路  Source: gatsbyjs/gatsby

Description

onInitialClientRender is never called and initial client render does not happen in IE10

Steps to reproduce

View a basic starter build in IE10 and notice that render is never called within your components.

Expected result

onInitialClientRender should be called inside of gatsby-browser.js and your React components should render.

Actual result

onInitialClientRender is not called inside of gatsby-browser.js and your React components do not render. Pre-rendered version still loads. Upon navigating and hitting the back button the intended functionality will occur.

Environment

Standard gatsbyjs build.

Workaround

Using yarn I am able to override the domready version and this seems to fix the issue

"resolutions": {
    "domready": "1.0.7"
  }

Please refer to this issue - https://github.com/ded/domready/issues/53

stale? upstream

All 6 comments

@gluemonkey i've picked up on your issue. And below are the steps i've taken and the results achieved.

  • Created a new Gatsby website using the default starter through gatsby new test_quick_start
  • Updated gatsby-browser.js to the following to check if i could get it to trigger:
exports.onInitialClientRender=()=>{
    console.log(`onInitialClientRender was fired`);
}
  • Issued gatsby develop and waited to the process to complete.
  • Opened edge (as i don't have access to ie10 currently) and the devtools, switched emulation to the following:
    emulation
  • With the emulation activated the site was re-rendered and switching to the console tab i'm presented with this:
    console

As you can see the site is being rendered and browser api is triggered, No issues whatsoever from my side. It could be that you have something else happening in the api that could be causing the issue.
If the work you're doing is not private or otherwise protected, if you can share a repository with the code it would be great so that it could be further investigated. Otherwise, create a dummy repository with the code that triggers the issue you've experienced.

Feel free to provide further feedback so that this issue can be solved.

Based on https://github.com/ded/domready/issues/53 it does seem that IE10 support is broken by domready after 1.0.7 because of some regex matching code that was added

Let me try reproducing this and I'll post what I can find here

Same issue although for me - 1.0.7 does not work either.
I needed to add a fallback window load listener to the domready lib.

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 馃挭馃挏

Hey again!

It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.

Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!

any updates about this? It still doesn't work if I downgrade domready to 1.0.7.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  路  3Comments

3CordGuy picture 3CordGuy  路  3Comments

ghost picture ghost  路  3Comments

magicly picture magicly  路  3Comments

totsteps picture totsteps  路  3Comments