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
This commit is contained in:
Weston Ruter 2017-11-15 18:11:17 +00:00
parent 672eb9206b
commit 323a8c95f0

View File

@ -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();