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

Props kkoppenhaver, celloexpressions.
Fixes #37980.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-10-25 04:36:39 +00:00
parent 0314e29667
commit a1777db166
7 changed files with 20 additions and 12 deletions

View File

@ -463,14 +463,16 @@ h3.customize-section-title {
display: block; display: block;
} }
.panel-meta.customize-info .accordion-section-title { #customize-controls .panel-meta.customize-info .accordion-section-title {
margin-right: 48px; margin-right: 48px;
border-right: 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; background: #fff;
color: #555; color: #555;
border-right: none; border-right-color: #fff;
} }
.customize-controls-close:focus, .customize-controls-close:focus,

File diff suppressed because one or more lines are too long

View File

@ -463,14 +463,16 @@ h3.customize-section-title {
display: block; display: block;
} }
.panel-meta.customize-info .accordion-section-title { #customize-controls .panel-meta.customize-info .accordion-section-title {
margin-left: 48px; 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; background: #fff;
color: #555; color: #555;
border-left: none; border-left-color: #fff;
} }
.customize-controls-close:focus, .customize-controls-close:focus,

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-alpha-38899'; $wp_version = '4.7-alpha-38900';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.