diff --git a/packages/edit-site/src/components/navigation-sidebar/navigation-toggle/index.js b/packages/edit-site/src/components/navigation-sidebar/navigation-toggle/index.js index 71120e7f2c1b7..df311c25bb25c 100644 --- a/packages/edit-site/src/components/navigation-sidebar/navigation-toggle/index.js +++ b/packages/edit-site/src/components/navigation-sidebar/navigation-toggle/index.js @@ -8,7 +8,6 @@ import classnames from 'classnames'; */ import { useRef } from '@wordpress/element'; import { useSelect, useDispatch } from '@wordpress/data'; -import { useEffect, useRef } from '@wordpress/element'; import { Button, Icon, @@ -48,16 +47,6 @@ function NavigationToggle( { icon } ) { const disableMotion = useReducedMotion(); - const navigationToggleRef = useRef(); - - useEffect( () => { - // TODO: Remove this effect when alternative solution is merged. - // See: https://github.com/WordPress/gutenberg/pull/37314 - if ( ! isNavigationOpen ) { - navigationToggleRef.current.focus(); - } - }, [ isNavigationOpen ] ); - const toggleNavigationPanel = () => setIsNavigationPanelOpened( ! isNavigationOpen ); @@ -104,7 +93,6 @@ function NavigationToggle( { icon } ) {