Skip to content

Commit da1f881

Browse files
committed
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
1 parent 0928c1d commit da1f881

5 files changed

Lines changed: 0 additions & 10 deletions

File tree

src/js/_enqueues/admin/media.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@
223223

224224
// Clear the selection and move focus back to the trigger.
225225
event.clearSelection();
226-
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680.
227-
triggerElement.trigger( 'focus' );
228226

229227
// Show success visual feedback.
230228
clearTimeout( copyAttachmentURLSuccessTimeout );

src/js/_enqueues/admin/post.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,6 @@ jQuery( function($) {
13031303

13041304
// Clear the selection and move focus back to the trigger.
13051305
event.clearSelection();
1306-
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
1307-
triggerElement.trigger( 'focus' );
13081306

13091307
// Show success visual feedback.
13101308
clearTimeout( copyAttachmentURLSuccessTimeout );

src/js/_enqueues/admin/site-health.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jQuery( function( $ ) {
2626

2727
// Clear the selection and move focus back to the trigger.
2828
e.clearSelection();
29-
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
30-
triggerElement.trigger( 'focus' );
3129

3230
// Show success visual feedback.
3331
clearTimeout( successTimeout );

src/js/_enqueues/vendor/plupload/handlers.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,6 @@ function copyAttachmentUploadURLClipboard() {
380380

381381
// Clear the selection and move focus back to the trigger.
382382
event.clearSelection();
383-
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
384-
triggerElement.trigger( 'focus' );
385383
// Show success visual feedback.
386384
clearTimeout( successTimeout );
387385
successElement.removeClass( 'hidden' );

src/js/media/views/attachment/details.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
4747

4848
// Clear the selection and move focus back to the trigger.
4949
event.clearSelection();
50-
// Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
51-
triggerElement.trigger( 'focus' );
5250

5351
// Show success visual feedback.
5452
clearTimeout( successTimeout );

0 commit comments

Comments
 (0)