Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Ensure that section containing post editor control is expanded upon c…
Browse files Browse the repository at this point in the history
…ontrol expansion

Fixes #259
  • Loading branch information
westonruter committed Sep 18, 2016
1 parent 6e227bb commit 0360e99
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/customize-post-editor-control.js
Expand Up @@ -101,7 +101,15 @@
* @param {Object} [params]
* @returns {Boolean} false if state already applied
*/
_toggleExpanded: api.Section.prototype._toggleExpanded,
_toggleExpanded: function( expanded, params ) {
var control = this;

if ( expanded && control.section() && api.section.has( control.section() ) ) {
api.section( control.section() ).expand();
}

return api.Section.prototype._toggleExpanded.call( control, expanded, params );
},

/**
* Expand the control.
Expand Down

0 comments on commit 0360e99

Please sign in to comment.