Explorar el Código

Fix load events to also work on turbolinksed pages

Maarten van den Berg %!s(int64=8) %!d(string=hace) años
padre
commit
ed86200dfc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/assets/javascripts/buttonhandlers.js

+ 1 - 1
app/assets/javascripts/buttonhandlers.js

@@ -1,6 +1,6 @@
1 1
 // Provides handlers for the buttons!
2 2
 
3
-$(setup_handlers);
3
+document.addEventListener("turbolinks:load", setup_handlers);
4 4
 
5 5
 // Add the presence handler to all buttons on the page
6 6
 function setup_handlers()