Merge 1c68f2c681fe4dcba654ac67c5c8f91f1b7e4dfc into e32fe3f91c2d45f27f72a3662133b1c0e1a5bda1

This commit is contained in:
Joe "Andrew" Rawlinson-Bennett 2017-05-18 16:52:43 +00:00 committed by GitHub
commit ed4ad9b7f7

View File

@ -1603,6 +1603,11 @@ SimpleMDE.prototype.autosave = function() {
if(simplemde.element.form != null && simplemde.element.form != undefined) { if(simplemde.element.form != null && simplemde.element.form != undefined) {
simplemde.element.form.addEventListener("submit", function() { 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); localStorage.removeItem("smde_" + simplemde.options.autosave.uniqueId);
}); });
} }