[wp-trac] [WordPress Trac] #34514: Newly added widgets no longer auto-expand

WordPress Trac noreply at wordpress.org
Sun Nov 1 07:09:30 UTC 2015


#34514: Newly added widgets no longer auto-expand
--------------------------+--------------------------
 Reporter:  Clorith       |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.4
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+--------------------------
Changes (by westonruter):

 * keywords:  needs-patch => has-patch


Comment:

 Actually the issue was introduced in r35231, specifically with this
 addition:

 {{{#!js
 // Short-circuit expand() if the instance is not active.
 if ( expanded && ! instance.active() ) {
         return false;
 }
 }}}

 The fix is simple, to just make the newly-added widget controls `active`
 to begin with: [attachment:34514.diff]. The `active` state currently is
 getting set once the preview refreshes. So the change here will be that
 the widget may not get rendered into the preview due to some filter on
 `sidebars_widgets`, and in this case the widget would then appear as
 inactive (partially grayed out) once the preview reloads. Since the normal
 case is for the widget to be active from the start, I think the change
 makes sense for a default.

 @Clorith Please test.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34514#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list