Ticket #48198: 48198.diff
File 48198.diff, 977 bytes (added by , 4 years ago) |
---|
-
src/js/_enqueues/wp/customize/nav-menus.js
190 190 */ 191 191 initialize: function() { 192 192 var self = this; 193 $searchSection = $( '#available-menu-items-search' ), 194 $otherSections = $( '#available-menu-items .accordion-section' ).not( $searchSection ); 193 195 194 196 if ( ! api.panel.has( 'nav_menus' ) ) { 195 197 return; … … 219 221 // Clear the search results and trigger a `keyup` event to fire a new search. 220 222 this.$clearResults.on( 'click', function() { 221 223 self.$search.val( '' ).focus().trigger( 'keyup' ); 224 $searchSection.removeClass( 'open' ); 225 $otherSections.show(); 226 self.$clearResults.removeClass( 'is-visible' ); 222 227 } ); 223 228 224 229 this.$el.on( 'input', '#custom-menu-item-name.invalid, #custom-menu-item-url.invalid', function() {