Skip to content

Commit

Permalink
[Block Library - Post Terms]: Insert defaultBlock on suffix end split (
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored May 9, 2022
1 parent 859311e commit 033a06f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-library/src/post-terms/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
useBlockDisplayInformation,
RichText,
} from '@wordpress/block-editor';
import { createBlock } from '@wordpress/blocks';
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
import { Spinner, TextControl } from '@wordpress/components';
import { useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
Expand Down Expand Up @@ -148,7 +148,9 @@ export default function PostTermsEdit( {
}
tagName="span"
__unstableOnSplitAtEnd={ () =>
insertBlocksAfter( createBlock( 'core/paragraph' ) )
insertBlocksAfter(
createBlock( getDefaultBlockName() )
)
}
/>
) }
Expand Down

0 comments on commit 033a06f

Please sign in to comment.