We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87d9c7e commit eab66c0Copy full SHA for eab66c0
app/assets/javascripts/application.js
@@ -78,6 +78,12 @@ window.loadCalendar = function(url) {
78
return true;
79
}
80
81
+// Fix select2 elements being duplicated when the back button is clicked.
82
+// Unfortunately causes the content of the field to be lost if it wasn't saved.
83
+document.addEventListener("turbolinks:before-cache", function() {
84
+ $('.js-select2').select2('destroy');
85
+});
86
+
87
document.addEventListener("turbolinks:load", function(e) {
88
// Show the tab associated with the window location hash (e.g. "#packages")
89
if (window.location.hash) {
0 commit comments