Customize: Fix auto-expand (and focus) on newly added widgets.

Add widget controls with an initially-true `active` state so that calling `expand()` will not be short-circuited. Previously the `active` state would be set once the preview refreshes, but this happens too late for the `addWidget` call. Fixes regression introduced in [35231].

Fixes #34514.

Built from https://develop.svn.wordpress.org/trunk@35486


git-svn-id: http://core.svn.wordpress.org/trunk@35450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2015-11-01 22:27:26 +00:00
parent 6924523366
commit 2e98e461a2
3 changed files with 4 additions and 3 deletions

View File

@ -2001,7 +2001,8 @@
is_new: ! isExistingWidget,
width: widget.get( 'width' ),
height: widget.get( 'height' ),
is_wide: widget.get( 'is_wide' )
is_wide: widget.get( 'is_wide' ),
active: true
},
previewer: self.setting.previewer
} );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta2-35485';
$wp_version = '4.4-beta2-35486';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.