Skip to content

Commit

Permalink
Reset insertion point on block order change
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed May 9, 2024
1 parent 15405fd commit ac1bbad
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ function ZoomOutModeInserters() {
};
}, [] );

useEffect( () => {
// reset insertion point when the block order changes
setInserterIsOpened( true );
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ blockOrder ] );

// Defer the initial rendering to avoid the jumps due to the animation.
useEffect( () => {
const timeout = setTimeout( () => {
Expand Down

0 comments on commit ac1bbad

Please sign in to comment.