diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 6d370ee7..87140329 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -889,6 +889,7 @@ var CodeOceanEditor = { this.initializeDeadlines(); CodeOceanEditorTips.initializeEventHandlers(); + window.addEventListener("turbolinks:before-render", this.unloadAutoSave.bind(this)); window.addEventListener("beforeunload", this.unloadAutoSave.bind(this)); // create autosave when the editor is opened the first time this.autosave();