diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js
index e3daa8c4d1..2d9fc8c09b 100644
|
a
|
b
|
$( function() { |
| 1733 | 1733 | setTimeout( function() { |
| 1734 | 1734 | var focusIsInToggle = $.contains( toggleButton, focusedElement ); |
| 1735 | 1735 | var focusIsInSidebar = $.contains( sidebar, focusedElement ); |
| 1736 | | |
| | 1736 | |
| 1737 | 1737 | if ( ! focusIsInToggle && ! focusIsInSidebar ) { |
| 1738 | 1738 | $( toggleButton ).trigger( 'click.wp-responsive' ); |
| 1739 | 1739 | } |
| … |
… |
$( function( $ ) { |
| 2129 | 2129 | /** |
| 2130 | 2130 | * Freeze animated plugin icons when reduced motion is enabled. |
| 2131 | 2131 | * |
| 2132 | | * When the user has enabled the 'prefers-reduced-motion' setting, this module |
| 2133 | | * stops animations for all GIFs on the page with the class 'plugin-icon' or |
| | 2132 | * When the user has enabled the 'prefers-reduced-motion' setting, this module |
| | 2133 | * stops animations for all GIFs on the page with the class 'plugin-icon' or |
| 2134 | 2134 | * plugin icon images in the update plugins table. |
| 2135 | 2135 | * |
| 2136 | 2136 | * @since 6.4.0 |
| … |
… |
$( function( $ ) { |
| 2156 | 2156 | var width = img.width; |
| 2157 | 2157 | var height = img.height; |
| 2158 | 2158 | var canvas = document.createElement( 'canvas' ); |
| 2159 | | |
| | 2159 | |
| 2160 | 2160 | // Set canvas dimensions. |
| 2161 | 2161 | canvas.width = width; |
| 2162 | 2162 | canvas.height = height; |
| … |
… |
$( function( $ ) { |
| 2220 | 2220 | // Listen for jQuery AJAX events. |
| 2221 | 2221 | ( function( $ ) { |
| 2222 | 2222 | $( document ).ajaxComplete( function( event, xhr, settings ) { |
| | 2223 | |
| | 2224 | // Return early if this is not the plugin-install.php page. |
| | 2225 | if ( window.pagenow !== 'plugin-install' ) { |
| | 2226 | return; |
| | 2227 | } |
| | 2228 | |
| 2223 | 2229 | // Check if this is the 'search-install-plugins' request. |
| 2224 | | if ( settings.data && settings.data.includes( 'action=search-install-plugins' ) ) { |
| | 2230 | if ( settings.data && typeof settings.data === "string" && settings.data.includes( 'action=search-install-plugins' ) ) { |
| 2225 | 2231 | // Recheck if the user prefers reduced motion. |
| 2226 | 2232 | if ( window.matchMedia ) { |
| 2227 | 2233 | var mediaQuery = window.matchMedia( '(prefers-reduced-motion: reduce)' ); |