diff --git a/package-lock.json b/package-lock.json index c01f19ad332288..e20f5e9a4ed02b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22339,16 +22339,6 @@ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, - "node_modules/clipboard": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", - "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", - "dependencies": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, "node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -54827,7 +54817,7 @@ "@wordpress/priority-queue": "file:../priority-queue", "@wordpress/undo-manager": "file:../undo-manager", "change-case": "^4.1.2", - "clipboard": "^2.0.8", + "clipboard": "^2.0.11", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" }, @@ -54838,6 +54828,16 @@ "react": "^18.0.0" } }, + "packages/compose/node_modules/clipboard": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "dependencies": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "packages/core-commands": { "name": "@wordpress/core-commands", "version": "0.17.0", @@ -70238,9 +70238,21 @@ "@wordpress/priority-queue": "file:../priority-queue", "@wordpress/undo-manager": "file:../undo-manager", "change-case": "^4.1.2", - "clipboard": "^2.0.8", + "clipboard": "^2.0.11", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" + }, + "dependencies": { + "clipboard": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", + "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + } } }, "@wordpress/core-commands": { @@ -74436,16 +74448,6 @@ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, - "clipboard": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.8.tgz", - "integrity": "sha512-Y6WO0unAIQp5bLmk1zdThRhgJt/x3ks6f30s3oE3H1mgIEU33XyQjEf8gsf6DxC7NPX8Y1SsNWjUjL/ywLnnbQ==", - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", diff --git a/packages/compose/package.json b/packages/compose/package.json index 0dec375ed22430..eba93bd2057ac1 100644 --- a/packages/compose/package.json +++ b/packages/compose/package.json @@ -39,7 +39,7 @@ "@wordpress/priority-queue": "file:../priority-queue", "@wordpress/undo-manager": "file:../undo-manager", "change-case": "^4.1.2", - "clipboard": "^2.0.8", + "clipboard": "^2.0.11", "mousetrap": "^1.6.5", "use-memo-one": "^1.1.1" }, diff --git a/packages/compose/src/hooks/use-copy-to-clipboard/index.js b/packages/compose/src/hooks/use-copy-to-clipboard/index.js index 1d838a1158ecfb..94ab6048a4b467 100644 --- a/packages/compose/src/hooks/use-copy-to-clipboard/index.js +++ b/packages/compose/src/hooks/use-copy-to-clipboard/index.js @@ -54,9 +54,6 @@ export default function useCopyToClipboard( text, onSuccess ) { // button, ensuring that it is not reset to the body, and // further that it is kept within the rendered node. clearSelection(); - // Handle ClipboardJS focus bug, see - // https://github.com/zenorocha/clipboard.js/issues/680 - node.focus(); if ( onSuccessRef.current ) { onSuccessRef.current();