Ticket #42348: 42348.diff
| File 42348.diff, 877 bytes (added by , 8 years ago) |
|---|
-
src/wp-admin/js/theme.js
1347 1347 event.target.value = ''; 1348 1348 } 1349 1349 1350 // Note that doSearch is throttled.1350 // Since doSearch is debounced, it will only run when user input comes to a rest. 1351 1351 this.doSearch( event ); 1352 1352 }, 1353 1353 1354 1354 // Runs a search on the theme collection. 1355 doSearch: _. throttle( function( event ) {1355 doSearch: _.debounce( function( event ) { 1356 1356 var options = {}; 1357 1357 1358 1358 this.collection.doSearch( event.target.value.replace( /\+/g, ' ' ) ); … … 1520 1520 this.doSearch( event.target.value ); 1521 1521 }, 1522 1522 1523 doSearch: _. throttle( function( value ) {1523 doSearch: _.debounce( function( value ) { 1524 1524 var request = {}; 1525 1525 1526 1526 // Don't do anything if the search terms haven't changed.