From 61acf50278293f9b5b81d4fa3ac9005fa7c42952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Fri, 21 May 2021 18:25:28 +0300 Subject: [PATCH] Avoid all blocks re-rendering on isTyping change --- .../src/components/block-list/use-block-props/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-list/use-block-props/index.js b/packages/block-editor/src/components/block-list/use-block-props/index.js index bbffe084d575c7..41a6d6893e4370 100644 --- a/packages/block-editor/src/components/block-list/use-block-props/index.js +++ b/packages/block-editor/src/components/block-list/use-block-props/index.js @@ -98,8 +98,8 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) { adjustScrolling: isSelected || isFirstMultiSelectedBlock( clientId ), enableAnimation: - ! isTyping() && - getGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD, + getGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD && + ( ! isSelected || ! isTyping() ), }; }, [ clientId ]