[wp-trac] [WordPress Trac] #60139: Clean up ClipboardJS instances from focus management workaround
WordPress Trac
noreply at wordpress.org
Fri Dec 22 10:36:34 UTC 2023
#60139: Clean up ClipboardJS instances from focus management workaround
---------------------------------------+-------------------------
Reporter: afercia | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5
Component: External Libraries | Version:
Severity: normal | Keywords: needs-patch
Focuses: accessibility, javascript |
---------------------------------------+-------------------------
See related issue and PR on the Gutenberg editor repository:
https://github.com/WordPress/gutenberg/issues/57154 and
https://github.com/WordPress/gutenberg/pull/57156
ClipboardJS used to suffer from a bug that triggered a focus loss. Over
time WordPress implemented its own workaround to avoid this focus loss.
The issue was also reported upstream at
https://github.com/zenorocha/clipboard.js/issues/680
ClipboardJS 2.0.11 includes a fix for this focus loss issue so that the
workaround used by WordPress is no longer necessary.
Reference:
https://github.com/zenorocha/clipboard.js/releases/tag/v2.0.11
https://github.com/zenorocha/clipboard.js/pull/807
Given that Core already uses ClipboardJS 2.0.11 since a while, we can now
clean up all the related code for all the 'Copy' buttons in the codebase.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60139>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list