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.
Built from https://develop.svn.wordpress.org/trunk@54089


git-svn-id: http://core.svn.wordpress.org/trunk@53648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Clorith 2022-09-06 22:06:19 +00:00
parent b245a374b8
commit 6bf326e967
3 changed files with 2 additions and 6 deletions

View File

@ -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.

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-54088';
$wp_version = '6.1-alpha-54089';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.