Ticket #28888: 28888.diff
File 28888.diff, 2.7 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/wp/customize/widgets.js
203 203 /** 204 204 * Performs a search and handles selected widget. 205 205 */ 206 search: function( event ) {206 search: _.debounce( function( event ) { 207 207 var firstVisible; 208 208 209 209 this.collection.doSearch( event.target.value ); … … 245 245 } else { 246 246 this.$el.removeClass( 'no-widgets-found' ); 247 247 } 248 }, 248 }, 500 ), 249 249 250 250 /** 251 251 * Updates the count of the available widgets that have the `search_matched` attribute. … … 257 257 /** 258 258 * Sends a message to the aria-live region to announce how many search results. 259 259 */ 260 announceSearchMatches: _.debounce(function() {260 announceSearchMatches: function() { 261 261 var message = l10n.widgetsFound.replace( '%d', this.searchMatchesCount ) ; 262 262 263 263 if ( ! this.searchMatchesCount ) { … … 265 265 } 266 266 267 267 wp.a11y.speak( message ); 268 }, 500 ),268 }, 269 269 270 270 /** 271 271 * Changes visibility of available widgets. … … 708 708 } ); 709 709 710 710 $closeBtn = this.container.find( '.widget-control-close' ); 711 $closeBtn.on( 'click', function( e ) { 712 e.preventDefault(); 711 $closeBtn.on( 'click', function() { 713 712 self.collapse(); 714 713 self.container.find( '.widget-top .widget-action:first' ).focus(); // keyboard accessibility 715 714 } ); … … 987 986 988 987 // Configure remove button 989 988 $removeBtn = this.container.find( '.widget-control-remove' ); 990 $removeBtn.on( 'click', function( e ) { 991 e.preventDefault(); 992 989 $removeBtn.on( 'click', function() { 993 990 // Find an adjacent element to add focus to when this widget goes away 994 991 var $adjacentFocusTarget; 995 992 if ( self.container.next().is( '.customize-control-widget_form' ) ) { -
src/wp-includes/class-wp-customize-widgets.php
777 777 'saveBtnLabel' => __( 'Apply' ), 778 778 'saveBtnTooltip' => __( 'Save and preview changes before publishing them.' ), 779 779 'removeBtnLabel' => __( 'Remove' ), 780 'removeBtnTooltip' => __( ' Trash widget by moving it to the inactive widgets sidebar.' ),780 'removeBtnTooltip' => __( 'Keep widget settings and move it to the inactive widgets' ), 781 781 'error' => __( 'An error has occurred. Please reload the page and try again.' ), 782 782 'widgetMovedUp' => __( 'Widget moved up' ), 783 783 'widgetMovedDown' => __( 'Widget moved down' ),