diff --git a/packages/block-editor/src/components/rich-text/native/index.native.js b/packages/block-editor/src/components/rich-text/native/index.native.js index aa06c4dd1e892..4eeaabe6d790a 100644 --- a/packages/block-editor/src/components/rich-text/native/index.native.js +++ b/packages/block-editor/src/components/rich-text/native/index.native.js @@ -424,7 +424,9 @@ export class RichText extends Component { return; } - onDelete( { isReverse, value } ); + if ( onDelete ) { + onDelete( { isReverse, value } ); + } event.preventDefault(); this.lastAztecEventType = 'input'; diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 1a923d19dab25..07dbe7a245995 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -12,6 +12,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased - [internal] Fix Inserter items list filtering [#62334] - [*] Prevent hiding the keyboard when creating new list items [#62446] +- [*] RichText - Fix undefined onDelete callback [#62486] ## 1.120.0 - [*] Prevent deleting content when backspacing in the first Paragraph block [#62069]