Customize: Ensure `autosaving` message gets sent to preview after initial change when `saved` state is first dirty.
Amends [41667]. Fixes #42475 for trunk. Built from https://develop.svn.wordpress.org/trunk@42136 git-svn-id: http://core.svn.wordpress.org/trunk@41967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c00350575
commit
19ec50f92a
|
@ -9191,12 +9191,14 @@
|
|||
|
||||
api.unbind( 'change', startAutosaving ); // Ensure startAutosaving only fires once.
|
||||
|
||||
api.state( 'saved' ).bind( function( isSaved ) {
|
||||
function onChangeSaved( isSaved ) {
|
||||
if ( ! isSaved && ! api.settings.changeset.autosaved ) {
|
||||
api.settings.changeset.autosaved = true; // Once a change is made then autosaving kicks in.
|
||||
api.previewer.send( 'autosaving' );
|
||||
}
|
||||
} );
|
||||
}
|
||||
api.state( 'saved' ).bind( onChangeSaved );
|
||||
onChangeSaved( api.state( 'saved' ).get() );
|
||||
|
||||
/**
|
||||
* Request changeset update and then re-schedule the next changeset update time.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42134';
|
||||
$wp_version = '5.0-alpha-42136';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue