From 9dd8b5a2102a197e236fc05de2e47e85c03a8bd9 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 16 Jan 2018 17:15:00 +0000 Subject: [PATCH] Plugins: Fix the plugin details modal "Close" button after [42443]. Props rinkuyadav999. Fixes #43082. git-svn-id: https://develop.svn.wordpress.org/trunk@42491 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/plugin-install.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/js/plugin-install.js b/src/wp-admin/js/plugin-install.js index 8404b5260a..f2a0965a53 100644 --- a/src/wp-admin/js/plugin-install.js +++ b/src/wp-admin/js/plugin-install.js @@ -148,9 +148,11 @@ jQuery( document ).ready( function( $ ) { /* * 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. + * in the plugins search tab, after the AJAX search rebuilds the HTML. It's + * delegated on the closest ancestor and not on the body to avoid conflicts + * with other handlers, see Trac ticket #43082. */ - $( 'body' ).on( 'click', '.thickbox.open-plugin-details-modal', function( e ) { + $( '.wrap' ).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;