From 7fb41fc8455804298683495c2053a958c7258d31 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Fri, 27 Jan 2023 13:37:07 +0200 Subject: [PATCH] Block Editor: Improve `getBlockInsertionPoint` memoization (#47489) * Block Editor: Improve getBlockInsertionPoint memoization * Keep entire insertionPoint object as dependent --- packages/block-editor/src/store/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 04ee16cede9d4c..242d2816febe56 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -1403,7 +1403,7 @@ export const getBlockInsertionPoint = createSelector( }, ( state ) => [ state.insertionPoint, - state.selection.selectionEnd, + state.selection.selectionEnd.clientId, state.blocks.parents, state.blocks.order, ]