WordPress.org

Make WordPress Core

Ticket #18227: autosave.patch

File autosave.patch, 777 bytes (added by karevn, 4 years ago)
  • wp-includes/js/autosave.dev.js

     
    256256                post_data["post_name"] = jQuery('#post_name').val(); 
    257257 
    258258        // Nothing to save or no change. 
    259         if ( ( post_data["post_title"].length == 0 && post_data["content"].length == 0 ) || post_data["post_title"] + post_data["content"] == autosaveLast ) { 
     259        if ( ( (!post_data["post_title"] || (post_data["post_title"] && post_data["post_title"].length == 0)) &&  
     260                        (!post_data["content"] || (post_data["content"] && post_data["content"].length == 0))) ||  
     261                        post_data["post_title"] + post_data["content"] == autosaveLast ) { 
    260262                doAutoSave = false; 
    261263        } 
    262264