From d46ee113a22dd75026fbd0e6784a5921be542b76 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 23 Feb 2021 10:54:06 +0000 Subject: [PATCH] External Libraries: Correct `click` event handling in the Thickbox library. Follow-up to [50367], [50383]. Props peterwilsoncc. Fixes #52618. See #51812. Built from https://develop.svn.wordpress.org/trunk@50410 git-svn-id: http://core.svn.wordpress.org/trunk@50021 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/thickbox/thickbox.js | 14 +++++++------- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wp-includes/js/thickbox/thickbox.js b/wp-includes/js/thickbox/thickbox.js index 55c66caaf3..62ffb4b941 100644 --- a/wp-includes/js/thickbox/thickbox.js +++ b/wp-includes/js/thickbox/thickbox.js @@ -49,12 +49,12 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic jQuery("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 jQuery("body").append("
"); - jQuery("#TB_overlay").trigger( 'click', tb_remove ); + jQuery("#TB_overlay").on( 'click', tb_remove ); } }else{//all others if(document.getElementById("TB_overlay") === null){ jQuery("body").append("
"); - jQuery("#TB_overlay").trigger( 'click', tb_remove ); + jQuery("#TB_overlay").on( 'click', tb_remove ); jQuery( 'body' ).addClass( 'modal-open' ); } } @@ -141,7 +141,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic TB_HEIGHT = imageHeight + 60; jQuery("#TB_window").append(""+thickboxL10n.close+""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
"); - jQuery("#TB_closeWindowButton").trigger( 'click', tb_remove ); + jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if (!(TB_PrevHTML === "")) { function goPrev(){ @@ -151,7 +151,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } - jQuery("#TB_prev").trigger( 'click', goPrev ); + jQuery("#TB_prev").on( 'click', goPrev ); } if (!(TB_NextHTML === "")) { @@ -161,7 +161,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } - jQuery("#TB_next").trigger( 'click', goNext ); + jQuery("#TB_next").on( 'click', goNext ); } @@ -185,7 +185,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic tb_position(); jQuery("#TB_load").remove(); - jQuery("#TB_ImageOff").trigger( 'click', tb_remove ); + jQuery("#TB_ImageOff").on( 'click', tb_remove ); jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show }; @@ -225,7 +225,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic } } - jQuery("#TB_closeWindowButton").trigger( 'click', tb_remove ); + jQuery("#TB_closeWindowButton").on( 'click', tb_remove ); if(url.indexOf('TB_inline') != -1){ jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children()); diff --git a/wp-includes/version.php b/wp-includes/version.php index fab197f3a4..73cebffac3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta3-50409'; +$wp_version = '5.7-beta3-50410'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.