From 2601d009050cc62dbb4c4dd0dd7edc32e820086e Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 24 Jul 2020 17:13:30 +0100 Subject: [PATCH] Avoid focusing the block selection button on each render --- .../src/components/block-list/block-selection-button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list/block-selection-button.js b/packages/block-editor/src/components/block-list/block-selection-button.js index 5e9f9326cacb0..eab60be82f70c 100644 --- a/packages/block-editor/src/components/block-list/block-selection-button.js +++ b/packages/block-editor/src/components/block-list/block-selection-button.js @@ -63,7 +63,7 @@ function BlockSelectionButton( { clientId, rootClientId, ...props } ) { // Focus the breadcrumb in navigation mode. useEffect( () => { ref.current.focus(); - } ); + }, [] ); function onKeyDown( event ) { const { keyCode } = event;