Make WordPress Core

Changeset 57231


Ignore:
Timestamp:
12/28/2023 03:25:26 PM (18 months ago)
Author:
afercia
Message:

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.

Location:
trunk/src/js
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/media.js

    r52843 r57231  
    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.
  • trunk/src/js/_enqueues/admin/post.js

    r56809 r57231  
    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.
  • trunk/src/js/_enqueues/admin/site-health.js

    r56670 r57231  
    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.
  • trunk/src/js/_enqueues/vendor/plupload/handlers.js

    r54495 r57231  
    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 );
  • trunk/src/js/media/views/attachment/details.js

    r52725 r57231  
    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.
Note: See TracChangeset for help on using the changeset viewer.