Closed mildfuzz closed 11 years ago
alertify.js 0.4 appears to be tied to -> https://github.com/fabien-d/alertify.js/pull/158
Seems like the issue is also happening in 0.3
? I'm not familiar with turbolinks so hopefully someone can provide more insight.
Fixed with #161
As far as I can tell, Turbolinks messes with the global scope, which prevents the alerts being properly connected with the DOM.
My work around has been: //Keep global reference to alertify init() function $(document).on('ready',function(){ window alertifyInit = alertify.init; }); //re-initialise on page change/load $(document).on('page:change page:load',function(){ alertifyInit(); });
Hopefully, that hack will illuminate a solution to one of the devs (or at least help someone else out!!)