From f17d4bf90fb50f61824eefb3d8ebd02990e60ae2 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 22 May 2013 21:43:45 +0000 Subject: [PATCH] Local autosaves: always set 'autosave = true' in the post data when triggering local autosave on form submit. Fixes cases where the form is submitted shortly after loading the Edit screen, local autosave hasn't run yet and there is no previous data to be merged. Fixes #23960. git-svn-id: http://core.svn.wordpress.org/trunk@24328 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/autosave.js | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js index d9e73a1abd..7f932221dc 100644 --- a/wp-includes/js/autosave.js +++ b/wp-includes/js/autosave.js @@ -488,6 +488,7 @@ wp.autosave.local = { } else { post_data = this.getData() || {}; $.extend( post_data, data ); + post_data.autosave = true; } // If the content and title did not change since the last save, don't save again