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

Ensure that section containing post editor control is expanded upon control expansion #280

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion js/customize-post-editor-control.js
Original file line number Diff line number Diff line change
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