Skip to content

Dojo/Dijit – Pages load blank in chrome, show on resize

I had a problem recently where my dijit layouts would sometimes load as a blank page in chrome – but they would show if the browser window was resized. The pages worked fine in firefox.

Someone on IRC pointed out the solution: Move all the style tags ┬áto be a little way ahead of the script tags in <head> – apparently there is some race condition with chrome.

Hopefully this helps someone – Certainly wouldn’t have thought to try that!

Posted in Programming.

2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Mandamus says

    Very helpful, thank you.. been looking for a fix for this.. I’m having issues in chrome with containers not scaling properly until the window is resized.. this helped a bit.. I put a pause in script tags between the script loading and the CSS it helped. still a little twitchy though.

  2. Jordan Thoms says

    Yeah – Moving the style tags up fixed it perfectly for me, but I don’t have a very complex layout. More complex ones might still have problems – have you tried the chrome 10 or 11 betas? I had this issue with 9, so it might have been resolved in the newer versions

Some HTML is OK

or, reply to this post via trackback.