Merge a6d958107b41c67d0f552184501d7ca36a3b651d into 6abda7ab68cc20f4aca870eb243747951b90ab04

This commit is contained in:
Joe "Andrew" Rawlinson-Bennett 2016-11-25 07:45:18 +00:00 committed by GitHub
commit 2fa58c0b78

View File

@ -1553,6 +1553,11 @@ SimpleMDE.prototype.autosave = function() {
if(simplemde.element.form != null && simplemde.element.form != undefined) {
simplemde.element.form.addEventListener("submit", function() {
/**
* Remove the autosave function to stop resaving the MDE after the
* submit has been started.
*/
SimpleMDE.prototype.autosave = function(){};
localStorage.removeItem("smde_" + simplemde.options.autosave.uniqueId);
});
}