From 6466591e019c8d0f9841e011b4fbabe90039de87 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Wed, 18 Dec 2024 12:30:01 -0600 Subject: [PATCH 1/3] useFocusReturn: Get active element within the iframe when restoring focus (#68060) Co-authored-by: Alex Lende --- .../src/components/button-block-appender/index.js | 9 ++------- packages/compose/src/hooks/use-focus-return/index.js | 8 +++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/block-editor/src/components/button-block-appender/index.js b/packages/block-editor/src/components/button-block-appender/index.js index 53b15e2fd2cfd..4cde8c26d7563 100644 --- a/packages/block-editor/src/components/button-block-appender/index.js +++ b/packages/block-editor/src/components/button-block-appender/index.js @@ -7,7 +7,7 @@ import clsx from 'clsx'; * WordPress dependencies */ import { Button } from '@wordpress/components'; -import { forwardRef, useRef } from '@wordpress/element'; +import { forwardRef } from '@wordpress/element'; import { _x, sprintf } from '@wordpress/i18n'; import { Icon, plus } from '@wordpress/icons'; import deprecated from '@wordpress/deprecated'; @@ -16,15 +16,11 @@ import deprecated from '@wordpress/deprecated'; * Internal dependencies */ import Inserter from '../inserter'; -import { useMergeRefs } from '@wordpress/compose'; function ButtonBlockAppender( { rootClientId, className, onFocus, tabIndex, onSelect }, ref ) { - const inserterButtonRef = useRef(); - - const mergedInserterButtonRef = useMergeRefs( [ inserterButtonRef, ref ] ); return ( Date: Sun, 22 Dec 2024 20:55:53 +0100 Subject: [PATCH 2/3] try fix canisue bug on testing --- package-lock.json | 1 - package.json | 1 - 2 files changed, 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4edda0b689e0e..e22e852794f44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -170,7 +170,6 @@ "babel-plugin-transform-remove-console": "6.9.4", "benchmark": "2.1.4", "browserslist": "4.22.2", - "caniuse-lite": "1.0.30001636", "chalk": "4.1.1", "change-case": "4.1.2", "client-zip": "^2.4.5", diff --git a/package.json b/package.json index a4cc002adbf8e..c2b91328cb879 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,6 @@ "babel-plugin-transform-remove-console": "6.9.4", "benchmark": "2.1.4", "browserslist": "4.22.2", - "caniuse-lite": "1.0.30001636", "chalk": "4.1.1", "change-case": "4.1.2", "client-zip": "^2.4.5", From 181118b2ca9c79a17aec5294edd023997fcb7626 Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+cbravobernal@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:00:45 +0100 Subject: [PATCH 3/3] update lock --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e22e852794f44..893cd79202d8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20458,9 +20458,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", + "version": "1.0.30001690", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", + "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", "funding": [ { "type": "opencollective", @@ -72360,9 +72360,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==" + "version": "1.0.30001690", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", + "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==" }, "capital-case": { "version": "1.0.4",