Fix duplication of code when navigation back and forth
This commit is contained in:
@ -782,8 +782,9 @@ configureEditors: function () {
|
|||||||
this.showFirstFile();
|
this.showFirstFile();
|
||||||
this.resizeAceEditors();
|
this.resizeAceEditors();
|
||||||
|
|
||||||
$(window).on("beforeunload", this.unloadAutoSave.bind(this));
|
window.addEventListener("beforeunload", this.unloadAutoSave.bind(this));
|
||||||
|
window.addEventListener("page:before-change", this.unloadAutoSave.bind(this));
|
||||||
// create autosave when the editor is opened the first time
|
// create autosave when the editor is opened the first time
|
||||||
// TODO: this.autosave();
|
this.autosave();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
- content_for :head do
|
- content_for :head do
|
||||||
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
|
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
|
||||||
Otherwise, lti_parameters might be nil
|
Otherwise, lti_parameters might be nil
|
||||||
meta name='turbolinks-visit-control' content='reload'
|
meta name="turbolinks-cache-control" content="no-cache"
|
||||||
|
|
||||||
.row
|
.row
|
||||||
#editor-column.col-md-12
|
#editor-column.col-md-12
|
||||||
|
Reference in New Issue
Block a user