Changeset 48461
- Timestamp:
- 07/13/2020 08:13:49 PM (4 years ago)
- Location:
- trunk/src/js/_enqueues/wp/customize
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/customize/nav-menus.js
r47356 r48461 217 217 } ); 218 218 219 // Clear the search results and trigger a `keyup` event to fire a new search.219 // Clear the search results and trigger an `input` event to fire a new search. 220 220 this.$clearResults.on( 'click', function() { 221 self.$search.val( '' ).focus().trigger( ' keyup' );221 self.$search.val( '' ).focus().trigger( 'input' ); 222 222 } ); 223 223 … … 734 734 $( '#available-menu-items .menu-item-handle.item-added' ).removeClass( 'item-added' ); 735 735 736 this.$search.val( '' ).trigger( ' keyup' );736 this.$search.val( '' ).trigger( 'input' ); 737 737 }, 738 738 … … 1820 1820 * If the menu item deleted is the only of its instance left, 1821 1821 * remove the check icon of this menu item in the right panel. 1822 */ 1822 */ 1823 1823 _.each( addedItems, function( addedItem ) { 1824 1824 var menuItemId, menuItemControl, matches; 1825 1825 1826 1826 // This is because menu item that's deleted is just hidden. 1827 1827 if ( ! $( addedItem ).is( ':visible' ) ) { -
trunk/src/js/_enqueues/wp/customize/widgets.js
r47233 r48461 194 194 } ); 195 195 196 // Clear the search results and trigger a new search.196 // Clear the search results and trigger an `input` event to fire a new search. 197 197 this.$clearResults.on( 'click', function() { 198 self.$search.val( '' ).focus(); 199 self.collection.doSearch( '' ); 198 self.$search.val( '' ).focus().trigger( 'input' ); 200 199 } ); 201 200 … … 386 385 $( 'body' ).removeClass( 'adding-widget' ); 387 386 388 this.$search.val( '' ) ;387 this.$search.val( '' ).trigger( 'input' ); 389 388 }, 390 389
Note: See TracChangeset
for help on using the changeset viewer.