From 563e24ced1bcf991e980bc870b48f5c41e61c774 Mon Sep 17 00:00:00 2001 From: "Marius L. J" Date: Tue, 6 Sep 2022 22:03:23 +0000 Subject: [PATCH] Site Health: Fix TypeError when copying debug information. In [53164] the `clipboard.js` library was updated to from version 2.0.8 to 2.0.10, and in doing so caused a TypeError JavaScript error to be thrown when the copy button for debug information was used. With the update, the `clipboard.js` library introduced an enhancement to its `.copy()` API, which now removes the fake DOM element used for copying content, which Site Health previously had to remove manually. As this fake DOM element is now removed automatically, the copy function within the debug information screen can rely on the library performing the removal, instead of WordPress needing to do so manually. Props hiren1094, costdev. Fixes #56515. git-svn-id: https://develop.svn.wordpress.org/trunk@54089 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/admin/site-health.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/js/_enqueues/admin/site-health.js b/src/js/_enqueues/admin/site-health.js index 4c6ae5ffa4..9c4ee5c8b7 100644 --- a/src/js/_enqueues/admin/site-health.js +++ b/src/js/_enqueues/admin/site-health.js @@ -34,10 +34,6 @@ jQuery( function( $ ) { // Hide success visual feedback after 3 seconds since last success. successTimeout = setTimeout( function() { successElement.addClass( 'hidden' ); - // Remove the visually hidden textarea so that it isn't perceived by assistive technologies. - if ( clipboard.clipboardAction.fakeElem && clipboard.clipboardAction.removeFake ) { - clipboard.clipboardAction.removeFake(); - } }, 3000 ); // Handle success audible feedback.