From 1c9c97fd021ff62fb6b3aaee67c55fd481a05fa0 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 11 Oct 2017 05:56:40 +0000 Subject: [PATCH] Customize: Make sure `saved` state is initially `false` when restoring autosave revision so that Save button will be enabled. Amends [41597]. Props sayedwp. See #39896. Fixes #42143. git-svn-id: https://develop.svn.wordpress.org/trunk@41826 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 06f2db28fe..c9e7b67886 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -7756,6 +7756,7 @@ } if ( api.settings.changeset.autosaved ) { + api.state( 'saved' ).set( false ); stripParamsFromLocation( [ 'customize_autosaved' ] ); // Remove param when restoring autosave revision. } else if ( ! api.settings.changeset.branching && 'auto-draft' === api.settings.changeset.status ) { stripParamsFromLocation( [ 'changeset_uuid' ] ); // Remove UUID when restoring autosave auto-draft.