-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors after ajax page load #19
Comments
same for me: RoR 4.0.3 on Chrome 34.0.1847.131 |
+1. Any fixes yet? |
This is caused by the fact that turbolinks is replacing the body contents, but not reloading the widearea plugin. Consequently the call to Disabling turbolinks solves the problem, although this is not a great solution. Another workaround is as follows. Change this line: this._timer = window.setInterval(function() { to: _wideAreaTimer = window.setInterval(function() { This makes the reference to the timer global. It can then be cancelled in the plugins constructor function, before re-initializing it (or not). function WideArea(obj) {
if(window._wideAreaTimer) clearInterval(window._wideAreaTimer); |
When using this with Rails with turbolinks (standard in Rails 4) you get an endless loop of:
Uncaught TypeError: Cannot read property 'offsetWidth' of null
The text was updated successfully, but these errors were encountered: