--- a/wp/wp-admin/js/plugin-install.js Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-admin/js/plugin-install.js Wed Sep 21 18:19:35 2022 +0200
@@ -6,7 +6,7 @@
/* global tb_click, tb_remove, tb_position */
-jQuery( document ).ready( function( $ ) {
+jQuery( function( $ ) {
var tbWindow,
$iframeBody,
@@ -50,7 +50,7 @@
});
};
- $( window ).resize( function() {
+ $( window ).on( 'resize', function() {
tb_position();
});
@@ -75,7 +75,7 @@
.on( 'thickbox:removed', function() {
// Set focus back to the element that opened the modal dialog.
// Note: IE 8 would need this wrapped in a fake setTimeout `0`.
- $focusedBefore.focus();
+ $focusedBefore.trigger( 'focus' );
});
function iframeLoaded() {
@@ -88,7 +88,7 @@
handleTabbables();
// Set initial focus on the "Close" button.
- $firstTabbable.focus();
+ $firstTabbable.trigger( 'focus' );
/*
* When the "Install" button is disabled (e.g. the Plugin is already installed)
@@ -141,10 +141,10 @@
if ( $lastTabbable[0] === event.target && ! event.shiftKey ) {
event.preventDefault();
- $firstTabbable.focus();
+ $firstTabbable.trigger( 'focus' );
} else if ( $firstTabbable[0] === event.target && event.shiftKey ) {
event.preventDefault();
- $lastTabbable.focus();
+ $lastTabbable.trigger( 'focus' );
}
}
@@ -185,7 +185,7 @@
});
/* Plugin install related JS */
- $( '#plugin-information-tabs a' ).click( function( event ) {
+ $( '#plugin-information-tabs a' ).on( 'click', function( event ) {
var tab = $( this ).attr( 'name' );
event.preventDefault();