diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
index a994fda694..dd22ccfa14 100644
a
|
b
|
|
1208 | 1208 | wp.updates.updateThemeSuccess = function( response ) { |
1209 | 1209 | var isModalOpen = $( 'body.modal-open' ).length, |
1210 | 1210 | $theme = $( '[data-slug="' + response.slug + '"]' ), |
| 1211 | OpenModalSlug = ( isModalOpen ) ? $( '.theme-overlay .toggle-auto-update' ).attr('data-slug') : '', |
1211 | 1212 | updatedMessage = { |
1212 | 1213 | className: 'updated-message notice-success notice-alt', |
1213 | 1214 | message: _x( 'Updated!', 'theme' ) |
… |
… |
|
1233 | 1234 | $theme.find( '.theme-version-author-uri' ).html( newText ); |
1234 | 1235 | |
1235 | 1236 | // Clear the "time to next auto-update" text. |
1236 | | $theme.find( '.auto-update-time' ).empty(); |
| 1237 | $theme.find( '.auto-update-time' ).empty(); |
1237 | 1238 | } else { |
1238 | | $notice = $( '.theme-info .notice' ).add( $theme.find( '.update-message' ) ); |
| 1239 | $notice = $( 'body:not(.modal-open) .theme-info .notice' ).add( $theme.find( '.update-message' ) ); |
1239 | 1240 | |
1240 | 1241 | // Focus on Customize button after updating. |
1241 | | if ( isModalOpen ) { |
| 1242 | if ( isModalOpen && OpenModalSlug == response.slug ) { |
1242 | 1243 | $( '.load-customize:visible' ).trigger( 'focus' ); |
1243 | 1244 | $( '.theme-info .theme-autoupdate' ).find( '.auto-update-time' ).empty(); |
1244 | 1245 | } else { |
… |
… |
|
1254 | 1255 | $document.trigger( 'wp-theme-update-success', response ); |
1255 | 1256 | |
1256 | 1257 | // Show updated message after modal re-rendered. |
1257 | | if ( isModalOpen && 'customize' !== pagenow ) { |
| 1258 | if ( isModalOpen && 'customize' !== pagenow && OpenModalSlug == response.slug ) { |
1258 | 1259 | $( '.theme-info .theme-author' ).after( wp.updates.adminNotice( updatedMessage ) ); |
1259 | 1260 | } |
1260 | 1261 | }; |