diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index 9b9af9c49eee8..6d2275d8e783e 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -821,11 +821,18 @@ RichText.defaultProps = { const RichTextContainer = compose( [ withInstanceId, - withBlockEditContext( ( { clientId, onFocus, isSelected, onCaretVerticalPositionChange }, ownProps ) => { + withBlockEditContext( ( { clientId, onFocus, onCaretVerticalPositionChange, isSelected }, ownProps ) => { + // ownProps.onFocus and isSelected needs precedence over the block edit context + if ( ownProps.isSelected !== undefined ) { + isSelected = ownProps.isSelected; + } + if ( ownProps.onFocus !== undefined ) { + onFocus = ownProps.onFocus; + } return { - clientId, isSelected, - onFocus: onFocus || ownProps.onFocus, + clientId, + onFocus, onCaretVerticalPositionChange, }; } ),