Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Apr 26, 2024
1 parent 3fcc238 commit 4f9ec5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ function InserterMenu(

const searchRef = useRef();
useEffect( () => {
// We need to wait for the next frame to focus the search input
// becase the tabs component will try to focus the selected tab
window.requestAnimationFrame( () => {
searchRef?.current?.focus();
} );
Expand Down

0 comments on commit 4f9ec5b

Please sign in to comment.