Ticket #48198: 48198.2.diff
File 48198.2.diff, 1.4 KB (added by , 5 years ago) |
---|
-
src/js/_enqueues/wp/customize/nav-menus.js
216 216 } 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 224 224 this.$el.on( 'input', '#custom-menu-item-name.invalid, #custom-menu-item-url.invalid', function() { … … 733 733 $( 'body' ).removeClass( 'adding-menu-items' ); 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 739 739 // Add a few keyboard enhancements to the panel. … … 1819 1819 /* 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' ) ) { 1828 1828 return;