diff --git a/packages/block-editor/src/components/warning/index.js b/packages/block-editor/src/components/warning/index.js index 628a17d4f47899..17a014107b43af 100644 --- a/packages/block-editor/src/components/warning/index.js +++ b/packages/block-editor/src/components/warning/index.js @@ -9,23 +9,11 @@ import clsx from 'clsx'; import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { moreVertical } from '@wordpress/icons'; -import { useEffect, useRef } from '@wordpress/element'; function Warning( { className, actions, children, secondaryActions } ) { - const alertRef = useRef(); - - useEffect( () => { - alertRef.current?.focus(); - }, [] ); - return (
{ children } diff --git a/packages/block-editor/src/components/warning/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/warning/test/__snapshots__/index.js.snap index 57c384fab28ba3..dbaba10e18efe6 100644 --- a/packages/block-editor/src/components/warning/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/warning/test/__snapshots__/index.js.snap @@ -7,8 +7,6 @@ exports[`Warning should match snapshot 1`] = ` >