Customize: Skip attaching expansion event handlers to section containers with the `cannot-expand` class.

Props kkoppenhaver, celloexpressions.
Fixes #37980.


git-svn-id: https://develop.svn.wordpress.org/trunk@38900 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2016-10-25 04:36:00 +00:00
parent 7e9848df2b
commit 31156b0bfb
2 changed files with 9 additions and 3 deletions

View File

@ -463,14 +463,16 @@ h3.customize-section-title {
display: block;
}
.panel-meta.customize-info .accordion-section-title {
#customize-controls .panel-meta.customize-info .accordion-section-title {
margin-left: 48px;
border-left: none;
}
#customize-controls .panel-meta.customize-info .accordion-section-title:hover {
#customize-controls .panel-meta.customize-info .accordion-section-title:hover,
#customize-controls .cannot-expand:hover .accordion-section-title {
background: #fff;
color: #555;
border-left: none;
border-left-color: #fff;
}
.customize-controls-close:focus,

View File

@ -906,6 +906,10 @@
attachEvents: function () {
var meta, content, section = this;
if ( section.container.hasClass( 'cannot-expand' ) ) {
return;
}
// Expand/Collapse accordion sections on click.
section.container.find( '.accordion-section-title, .customize-section-back' ).on( 'click keydown', function( event ) {
if ( api.utils.isKeydownButNotEnterEvent( event ) ) {