diff --git a/packages/block-editor/src/components/default-block-appender/index.js b/packages/block-editor/src/components/default-block-appender/index.js index 992c641b9a5d4..7e83432b14a32 100644 --- a/packages/block-editor/src/components/default-block-appender/index.js +++ b/packages/block-editor/src/components/default-block-appender/index.js @@ -75,22 +75,22 @@ export function DefaultBlockAppender( { export default compose( withSelect( ( select, ownProps ) => { const { + getBlockAttributes, getBlockCount, getBlockName, - isBlockValid, getSettings, getTemplateLock, } = select( blockEditorStore ); const isEmpty = ! getBlockCount( ownProps.rootClientId ); - const isLastBlockDefault = + const isLastBlockEmptyDefault = getBlockName( ownProps.lastBlockClientId ) === - getDefaultBlockName(); - const isLastBlockValid = isBlockValid( ownProps.lastBlockClientId ); + getDefaultBlockName() && + getBlockAttributes( ownProps.lastBlockClientId )?.content === ''; const { bodyPlaceholder } = getSettings(); return { - isVisible: isEmpty || ! isLastBlockDefault || ! isLastBlockValid, + isVisible: isEmpty || ! isLastBlockEmptyDefault, showPrompt: isEmpty, isLocked: !! getTemplateLock( ownProps.rootClientId ), placeholder: bodyPlaceholder, diff --git a/packages/e2e-tests/specs/editor/various/links.test.js b/packages/e2e-tests/specs/editor/various/links.test.js index a33132a28ac69..40f860063fdb5 100644 --- a/packages/e2e-tests/specs/editor/various/links.test.js +++ b/packages/e2e-tests/specs/editor/various/links.test.js @@ -465,7 +465,6 @@ describe( 'Links', () => { // Confirm that submitting the input without any changes keeps the same // value and moves focus back to the paragraph. await page.keyboard.press( 'Enter' ); - await page.keyboard.press( 'ArrowRight' ); await page.keyboard.type( '.' ); expect( await getEditedPostContent() ).toMatchSnapshot(); } );