From 31156b0bfb89913b468b991705f3afc221782fcf Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 25 Oct 2016 04:36:00 +0000 Subject: [PATCH] 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 --- src/wp-admin/css/customize-controls.css | 8 +++++--- src/wp-admin/js/customize-controls.js | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index 4c2e91cd2a..3234eb6249 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -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, diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 18862ae8d6..91f5af1353 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -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 ) ) {