diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 6c5502b223dfc..2d1a7eced0730 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -117,7 +117,7 @@ function RichTextWrapper( onRemove, onMerge, onSplit, - onSplitAtEnd, + __unstableOnSplitAtEnd: onSplitAtEnd, __unstableOnSplitMiddle: onSplitMiddle, identifier, // To do: find a better way to implicitly inherit props. @@ -361,7 +361,7 @@ function RichTextWrapper( } else { onChange( insertLineSeparator( value ) ); } - } else if ( shiftKey ) { + } else if ( shiftKey || ( ! canSplit && ! onSplitAtEnd ) ) { if ( ! disableLineBreaks ) { onChange( insert( value, '\n' ) ); } diff --git a/packages/block-library/src/image/edit.js b/packages/block-library/src/image/edit.js index 4eab713a47987..71bcb8d0fe432 100644 --- a/packages/block-library/src/image/edit.js +++ b/packages/block-library/src/image/edit.js @@ -673,7 +673,7 @@ export class ImageEdit extends Component { } isSelected={ this.state.captionFocused } inlineToolbar - onSplitAtEnd={ () => + __unstableOnSplitAtEnd={ () => insertBlocksAfter( createBlock( 'core/paragraph' ) )