From 46d1036c62fe8b604885afe6adf1723ae4560e82 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Tue, 22 Feb 2022 18:06:06 +0800 Subject: [PATCH] Remove temp hack --- .../navigation-sidebar/navigation-toggle/index.js | 12 ------------ 1 file changed, 12 deletions(-) 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 } ) {