diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js
index e3daa8c4d1..38eddf0207 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( $ ) { |
| 2139 | 2139 | // Private variables and methods. |
| 2140 | 2140 | var priv = {}, |
| 2141 | 2141 | pub = {}, |
| | 2142 | $body = $( document.body ), |
| 2142 | 2143 | mediaQuery; |
| 2143 | 2144 | |
| 2144 | 2145 | // Initialize pauseAll to false; it will be set to true if reduced motion is preferred. |
| … |
… |
$( function( $ ) { |
| 2156 | 2157 | var width = img.width; |
| 2157 | 2158 | var height = img.height; |
| 2158 | 2159 | var canvas = document.createElement( 'canvas' ); |
| 2159 | | |
| | 2160 | |
| 2160 | 2161 | // Set canvas dimensions. |
| 2161 | 2162 | canvas.width = width; |
| 2162 | 2163 | canvas.height = height; |
| … |
… |
$( function( $ ) { |
| 2220 | 2221 | // Listen for jQuery AJAX events. |
| 2221 | 2222 | ( function( $ ) { |
| 2222 | 2223 | $( document ).ajaxComplete( function( event, xhr, settings ) { |
| | 2224 | |
| | 2225 | // Return early if this is not the plugin-install.php page. |
| | 2226 | if ( ! body.hasClass( 'plugin-install-php' ) ) { |
| | 2227 | return; |
| | 2228 | } |
| | 2229 | |
| 2223 | 2230 | // Check if this is the 'search-install-plugins' request. |
| 2224 | | if ( settings.data && settings.data.includes( 'action=search-install-plugins' ) ) { |
| | 2231 | if ( settings.data && typeof settings.data === "string" && settings.data.includes( 'action=search-install-plugins' ) ) { |
| 2225 | 2232 | // Recheck if the user prefers reduced motion. |
| 2226 | 2233 | if ( window.matchMedia ) { |
| 2227 | 2234 | var mediaQuery = window.matchMedia( '(prefers-reduced-motion: reduce)' ); |