External Libraries: Accessibility: Clean up clipboard.js Copy buttons from focus management workaround.

`clipboard.js` used to suffer from a bug that triggered a focus loss when activating the Copy buttons. The bug was fixed a while ago with the `clipboard.js` 2.0.11 release so that the workaround implemented in WordPress is no longer necessary.

Props dhrumilk, paulkevan, afercia.
Fixes #60139.


git-svn-id: https://develop.svn.wordpress.org/trunk@57231 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2023-12-28 15:25:26 +00:00
parent 0928c1dcb9
commit da1f881cf4
5 changed files with 0 additions and 10 deletions
-2
View File
@@ -223,8 +223,6 @@
// Clear the selection and move focus back to the trigger.
event.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680.
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( copyAttachmentURLSuccessTimeout );
-2
View File
@@ -1303,8 +1303,6 @@ jQuery( function($) {
// Clear the selection and move focus back to the trigger.
event.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( copyAttachmentURLSuccessTimeout );
-2
View File
@@ -26,8 +26,6 @@ jQuery( function( $ ) {
// Clear the selection and move focus back to the trigger.
e.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( successTimeout );
-2
View File
@@ -380,8 +380,6 @@ function copyAttachmentUploadURLClipboard() {
// Clear the selection and move focus back to the trigger.
event.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( successTimeout );
successElement.removeClass( 'hidden' );
-2
View File
@@ -47,8 +47,6 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
// Clear the selection and move focus back to the trigger.
event.clearSelection();
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
triggerElement.trigger( 'focus' );
// Show success visual feedback.
clearTimeout( successTimeout );