michelson / lazy_high_charts

Make highcharts a la ruby , works in rails 5.X / 4.X / 3.X, and other ruby web frameworks
http://www.suipit.com
MIT License
1.05k stars 243 forks source link

Turbolinks >= 5 accumulates event listeners #255

Closed mylesboone closed 3 years ago

mylesboone commented 4 years ago

The core_js encapsulated in the event listener gets executed on any subsequent turbolinks visit. This triggers accumulating Uncaught Error: Highcharts error #13: www.highcharts.com/errors/13 errors. Like the Turbolinks < 5 code, we should remove our event listener the first time the listener executes.

mylesboone commented 4 years ago

This is a duplicate of https://github.com/michelson/lazy_high_charts/issues/223 but that has been stale for over a year. There's also PR https://github.com/michelson/lazy_high_charts/pull/249 and https://github.com/michelson/lazy_high_charts/pull/224 that would fix this.

Suggested changes here: https://github.com/BaldwinAviation/lazy_high_charts/commit/7f050a48a76415aedc755190780da928e162b044