Hack datepicker to make it work with Turbolinks 5.x
Patch extracted from here the comments on turbolinks issue 253 and converted to vanilla javascript. The hide action over datepickers ensures us that opened datepickers will be closed before leving the page. Previously if you open any datepicker and then move to previous page you will keep seeing the datepicker in the restored page.
This commit is contained in:
@@ -111,6 +111,7 @@
|
||||
//= require cookies
|
||||
//= require columns_selector
|
||||
//= require budget_edit_associations
|
||||
//= require datepicker
|
||||
|
||||
var initialize_modules = function() {
|
||||
"use strict";
|
||||
@@ -169,6 +170,7 @@ var initialize_modules = function() {
|
||||
var destroy_non_idempotent_modules = function() {
|
||||
"use strict";
|
||||
|
||||
App.Datepicker.destroy();
|
||||
App.HTMLEditor.destroy();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user