Skip to content

Commit fd7b448

Browse files
committed
Use ClipboardJS latest version and clean up focus loss workaround.
1 parent df9f857 commit fd7b448

File tree

3 files changed

+25
-26
lines changed

3 files changed

+25
-26
lines changed

package-lock.json

Lines changed: 24 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compose/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"@wordpress/priority-queue": "file:../priority-queue",
4040
"@wordpress/undo-manager": "file:../undo-manager",
4141
"change-case": "^4.1.2",
42-
"clipboard": "^2.0.8",
42+
"clipboard": "^2.0.11",
4343
"mousetrap": "^1.6.5",
4444
"use-memo-one": "^1.1.1"
4545
},

packages/compose/src/hooks/use-copy-to-clipboard/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ export default function useCopyToClipboard( text, onSuccess ) {
5454
// button, ensuring that it is not reset to the body, and
5555
// further that it is kept within the rendered node.
5656
clearSelection();
57-
// Handle ClipboardJS focus bug, see
58-
// https://github.com/zenorocha/clipboard.js/issues/680
59-
node.focus();
6057

6158
if ( onSuccessRef.current ) {
6259
onSuccessRef.current();

0 commit comments

Comments
 (0)