From 3e47bf2774878e02ffc46b659a8ab947aca3bc4a Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 12 Dec 2024 13:14:34 +0100 Subject: [PATCH] Do not set focus on the Close revisions button in the canvas. --- .../edit-site/src/components/editor-canvas-container/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/editor-canvas-container/index.js b/packages/edit-site/src/components/editor-canvas-container/index.js index 050d2e19585cc4..fb3d2574c4cb79 100644 --- a/packages/edit-site/src/components/editor-canvas-container/index.js +++ b/packages/edit-site/src/components/editor-canvas-container/index.js @@ -10,7 +10,7 @@ import { ESCAPE } from '@wordpress/keycodes'; import { __ } from '@wordpress/i18n'; import { useDispatch, useSelect } from '@wordpress/data'; import { closeSmall } from '@wordpress/icons'; -import { useFocusOnMount, useFocusReturn } from '@wordpress/compose'; +import { useFocusReturn } from '@wordpress/compose'; import { store as preferencesStore } from '@wordpress/preferences'; import { store as editorStore, @@ -74,7 +74,6 @@ function EditorCanvasContainer( { ); const { setIsListViewOpened } = useDispatch( editorStore ); - const focusOnMountRef = useFocusOnMount( 'firstElement' ); const sectionFocusReturnRef = useFocusReturn(); function onCloseContainer() { @@ -119,7 +118,6 @@ function EditorCanvasContainer( { { /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }