From 168ee8577516c25c1e193c2be7f9d3442d5d3707 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Sun, 25 Feb 2018 18:47:46 +0000 Subject: [PATCH] Customizer: in menus, reset results when closing the 'add items' panel. Trigger a keyup event when clearing the search field in response to closing the add item panel. The keyup event triggers a search and resets the results. Previously, the search field was cleared while the potentially blank search results were left in place making it impossible to select new menu items. Props Blair jersyer, aranwer104, afercia. Fixes #43333. git-svn-id: https://develop.svn.wordpress.org/trunk@42744 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/customize-nav-menus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/js/customize-nav-menus.js b/src/wp-admin/js/customize-nav-menus.js index d23a69fb98..db846baaf2 100644 --- a/src/wp-admin/js/customize-nav-menus.js +++ b/src/wp-admin/js/customize-nav-menus.js @@ -727,7 +727,7 @@ $( 'body' ).removeClass( 'adding-menu-items' ); $( '#available-menu-items .menu-item-handle.item-added' ).removeClass( 'item-added' ); - this.$search.val( '' ); + this.$search.val( '' ).trigger( 'keyup' ); }, // Add a few keyboard enhancements to the panel.