Changeset 50420 for trunk/src/js/_enqueues/wp/updates.js
- Timestamp:
- 02/23/2021 07:43:23 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/updates.js
r50027 r50420 630 630 $card 631 631 .removeClass( 'plugin-card-update-failed' ) 632 .find( '.column-name a' ). focus();632 .find( '.column-name a' ).trigger( 'focus' ); 633 633 634 634 $card.find( '.update-now' ) … … 802 802 $card 803 803 .removeClass( 'plugin-card-update-failed' ) 804 .find( '.column-name a' ). focus();804 .find( '.column-name a' ).trigger( 'focus' ); 805 805 }, 200 ); 806 806 } ); … … 1216 1216 // Focus on Customize button after updating. 1217 1217 if ( isModalOpen ) { 1218 $( '.load-customize:visible' ). focus();1218 $( '.load-customize:visible' ).trigger( 'focus' ); 1219 1219 $( '.theme-info .theme-autoupdate' ).find( '.auto-update-time' ).empty(); 1220 1220 } else { 1221 $theme.find( '.load-customize' ). focus();1221 $theme.find( '.load-customize' ).trigger( 'focus' ); 1222 1222 } 1223 1223 } … … 1272 1272 $notice = $( '.theme-info .notice' ).add( $theme.find( '.notice' ) ); 1273 1273 1274 $( 'body.modal-open' ).length ? $( '.load-customize:visible' ). focus() : $theme.find( '.load-customize' ).focus();1274 $( 'body.modal-open' ).length ? $( '.load-customize:visible' ).trigger( 'focus' ) : $theme.find( '.load-customize' ).trigger( 'focus'); 1275 1275 } 1276 1276 … … 1769 1769 // #upgrade button must always be the last focus-able element in the dialog. 1770 1770 if ( 'upgrade' === event.target.id && ! event.shiftKey ) { 1771 $( '#hostname' ). focus();1771 $( '#hostname' ).trigger( 'focus' ); 1772 1772 1773 1773 event.preventDefault(); 1774 1774 } else if ( 'hostname' === event.target.id && event.shiftKey ) { 1775 $( '#upgrade' ). focus();1775 $( '#upgrade' ).trigger( 'focus' ); 1776 1776 1777 1777 event.preventDefault(); … … 1790 1790 $( 'body' ).addClass( 'modal-open' ); 1791 1791 $modal.show(); 1792 $modal.find( 'input:enabled:first' ). focus();1792 $modal.find( 'input:enabled:first' ).trigger( 'focus' ); 1793 1793 $modal.on( 'keydown', wp.updates.keydown ); 1794 1794 };
Note: See TracChangeset
for help on using the changeset viewer.