From d72fbf753f5400626cfc7af6be1df76198687861 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 15 Jan 2018 23:07:41 +0000 Subject: [PATCH] Plugins: Fix the plugin details modal in the install plugin search tab after [41356]. Props afercia. Merges [42443] to the 4.9 branch. Fixes #43082. Built from https://develop.svn.wordpress.org/branches/4.9@42456 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42285 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/plugin-install.js | 7 +++++-- wp-admin/js/plugin-install.min.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wp-admin/js/plugin-install.js b/wp-admin/js/plugin-install.js index 9fa218fe34..def6bc940a 100644 --- a/wp-admin/js/plugin-install.js +++ b/wp-admin/js/plugin-install.js @@ -146,8 +146,11 @@ jQuery( document ).ready( function( $ ) { } } - // Open the Plugin details modal. - $( '.thickbox.open-plugin-details-modal' ).on( 'click', function( e ) { + /* + * Open the Plugin details modal. The event is delegated to get also the links + * in the plugins search tab, after the AJAX search rebuilds the HTML. + */ + $( 'body' ).on( 'click', '.thickbox.open-plugin-details-modal', function( e ) { // The `data-title` attribute is used only in the Plugin screens. var title = $( this ).data( 'title' ) ? plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ) : plugininstallL10n.plugin_modal_label; diff --git a/wp-admin/js/plugin-install.min.js b/wp-admin/js/plugin-install.min.js index 0134916640..4944dded4c 100644 --- a/wp-admin/js/plugin-install.min.js +++ b/wp-admin/js/plugin-install.min.js @@ -1 +1 @@ -var tb_position;jQuery(document).ready(function(a){function b(){var b=e.find("#TB_iframeContent");f=b.contents().find("body"),c(),h.focus(),a("#plugin-information-tabs a",f).on("click",function(){c()}),f.on("keydown",function(a){27===a.which&&tb_remove()})}function c(){var b;g=a(":tabbable",f),h=e.find("#TB_closeWindowButton"),i=g.last(),b=h.add(i),b.off("keydown.wp-plugin-details"),b.on("keydown.wp-plugin-details",function(a){d(a)})}function d(a){9===a.which&&(i[0]!==a.target||a.shiftKey?h[0]===a.target&&a.shiftKey&&(a.preventDefault(),i.focus()):(a.preventDefault(),h.focus()))}var e,f,g,h,i,j=a(),k=a(".upload-view-toggle"),l=a(".wrap"),m=a(document.body);tb_position=function(){var b=a(window).width(),c=a(window).height()-(792