From 323a8c95f053c1a7d5148536e2a137c4e1639b0f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 15 Nov 2017 18:11:17 +0000 Subject: [PATCH] Customize: Prevent themes panel from auto-expanding in IE11. In IE11 the `input` event erroneously gets triggered initially without any user input. Amends [41648]. See #37661. Fixes #42556 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42187 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-controls.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 38e408ab67..5151a12695 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -1867,6 +1867,9 @@ // Search terms. debounced = _.debounce( section.checkTerm, 500 ); // Wait until there is no input for 500 milliseconds to initiate a search. section.contentContainer.on( 'input', '.wp-filter-search', function() { + if ( ! api.panel( 'themes' ).expanded() ) { + return; + } debounced( section ); if ( ! section.expanded() ) { section.expand();