From f12cb5527ee13f5086222054461f598d23f62067 Mon Sep 17 00:00:00 2001 From: Jeremy Yip Date: Fri, 28 Aug 2020 15:42:10 -0700 Subject: [PATCH] Display trailing inserter when parent block is selected --- .../src/components/block-list-appender/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list-appender/index.js b/packages/block-editor/src/components/block-list-appender/index.js index f95a8dcdd4f5c2..b5a7f075df98db 100644 --- a/packages/block-editor/src/components/block-list-appender/index.js +++ b/packages/block-editor/src/components/block-list-appender/index.js @@ -42,12 +42,18 @@ function BlockListAppender( { // Render the default block appender when renderAppender has not been // provided and the context supports use of the default appender. const isDocumentAppender = ! rootClientId; + const isParentSelected = selectedBlockClientId !== rootClientId; const isAnotherDefaultAppenderAlreadyDisplayed = selectedBlockClientId && ! blockClientIds.includes( selectedBlockClientId ); - if ( ! isDocumentAppender && isAnotherDefaultAppenderAlreadyDisplayed ) + if ( + ! isDocumentAppender && + ! isParentSelected && + isAnotherDefaultAppenderAlreadyDisplayed + ) { return null; + } appender = (