mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-31 21:48:36 +01:00
Customize: Ensure autosaving
message gets sent to preview after initial change when saved
state is first dirty.
Amends [41667]. Fixes #42475 for 4.9. Built from https://develop.svn.wordpress.org/branches/4.9@42137 git-svn-id: http://core.svn.wordpress.org/branches/4.9@41968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e6a91f7ccf
commit
707a3196f7
@ -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.
|
||||
|
4
wp-admin/js/customize-controls.min.js
vendored
4
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-RC2-42135';
|
||||
$wp_version = '4.9-RC2-42137';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user