Make WordPress Core

Changeset 45658


Ignore:
Timestamp:
07/18/2019 05:54:10 AM (5 years ago)
Author:
pento
Message:

Customizer: Show all widgets when the search field is cleared.

When clicking the clear button on the widget search field, the search results should refresh to show all widgets.

Props Mahesh901122.
Fixes #47534.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/widgets.js

    r44825 r45658  
    192192            } );
    193193
    194             // Clear the search results and trigger a `keyup` event to fire a new search.
     194            // Clear the search results and trigger a new search.
    195195            this.$clearResults.on( 'click', function() {
    196                 self.$search.val( '' ).focus().trigger( 'keyup' );
     196                self.$search.val( '' ).focus();
     197                self.collection.doSearch( '' );
    197198            } );
    198199
Note: See TracChangeset for help on using the changeset viewer.