diff --git a/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap index b3a9114f732726..ff2040497b12a7 100644 --- a/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/block-controls/test/__snapshots__/index.js.snap @@ -7,6 +7,7 @@ exports[`BlockControls should render a dynamic toolbar of controls 1`] = ` "clientId": undefined, "isSelected": true, "name": undefined, + "onCaretVerticalPositionChange": undefined, "onFocus": undefined, } } diff --git a/packages/block-editor/src/components/block-edit/index.js b/packages/block-editor/src/components/block-edit/index.js index cb98989d852558..63c475a50692ff 100644 --- a/packages/block-editor/src/components/block-edit/index.js +++ b/packages/block-editor/src/components/block-edit/index.js @@ -27,13 +27,13 @@ class BlockEdit extends Component { ); } - propsToContext( name, isSelected, clientId, onFocus ) { - return { name, isSelected, clientId, onFocus }; + propsToContext( name, isSelected, clientId, onFocus, onCaretVerticalPositionChange ) { + return { name, isSelected, clientId, onFocus, onCaretVerticalPositionChange }; } render() { - const { name, isSelected, clientId, onFocus } = this.props; - const value = this.propsToContext( name, isSelected, clientId, onFocus ); + const { name, isSelected, clientId, onFocus, onCaretVerticalPositionChange } = this.props; + const value = this.propsToContext( name, isSelected, clientId, onFocus, onCaretVerticalPositionChange ); return ( 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 ffea24cffbf2a5..4be5aad2e8b19e 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -761,6 +761,7 @@ const RichTextContainer = compose( [ return { isSelected: context.isSelected, clientId: context.clientId, + onCaretVerticalPositionChange: context.onCaretVerticalPositionChange, }; } @@ -769,6 +770,7 @@ const RichTextContainer = compose( [ clientId: context.clientId, isSelected: context.isSelected, onFocus: context.onFocus || ownProps.onFocus, + onCaretVerticalPositionChange: context.onCaretVerticalPositionChange, }; } ), ] )( RichText ); diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index eb44dd8126dcc9..fdb9ad613214fe 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -104,7 +104,6 @@ class HeadingEdit extends Component { } } onFocus={ this.props.onFocus } // always assign onFocus as a props onBlur={ this.props.onBlur } // always assign onBlur as a props - onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } onChange={ ( value ) => setAttributes( { content: value } ) } onMerge={ mergeBlocks } onSplit={ this.splitBlock } diff --git a/packages/block-library/src/paragraph/edit.native.js b/packages/block-library/src/paragraph/edit.native.js index f7d26d596a656e..6b43018a2f3650 100644 --- a/packages/block-library/src/paragraph/edit.native.js +++ b/packages/block-library/src/paragraph/edit.native.js @@ -102,7 +102,6 @@ class ParagraphEdit extends Component { isSelected={ this.props.isSelected } onFocus={ this.props.onFocus } // always assign onFocus as a props onBlur={ this.props.onBlur } // always assign onBlur as a props - onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } style={ style } onChange={ ( nextContent ) => { setAttributes( {