Skip to content

Conversation

@ghiculescu
Copy link
Contributor

This bug comes up when using Turbolinks. I've been able to replicate it in Chrome 31 and Firefox 24 - though the test harness only works in FF because Turbolinks doesn't run on localhost in Chrome (due to security policy).

I'm not sure exactly why (haven't dove deep enough into Google's code yet), but calling google.load('visualization','1', {packages: ['corechart']}); without a callback is the culprit. The issue comes up when Turbolinks inserts the script and causes the browser to execute it.

My fix is to add a callback referring to the given function. This way you're still able to refer to the function by name, without the bug occurring.

winston added a commit that referenced this pull request Nov 24, 2013
Fix: chart loading can fail, and cause the entire page to render as a white screen, when using Turbolinks
@winston winston merged commit dd245df into winston:master Nov 24, 2013
@winston
Copy link
Owner

winston commented Nov 24, 2013

This is great! Thank you! And sorry for taking so long to review this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants