From 60c75b06abc3c2cbf3a2ad361a9625c9287b72fb Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Tue, 23 Apr 2019 10:09:23 +0300 Subject: [PATCH] If text already changed, don't modify it --- .../block-editor/src/components/rich-text/index.native.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 ffea24cffbf2a..441708fccefdc 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -305,8 +305,10 @@ export class RichText extends Component { } ); this.onSplit( ...split( currentRecord ).map( this.valueToFormat ) ); } else { - const insertedLineSeparator = { needsSelectionUpdate: true, ...insertLineSeparator( currentRecord ) }; - this.onFormatChangeForceChild( insertedLineSeparator ); + if ( ! event.nativeEvent.firedAfterTextChanged ) { + const insertedLineSeparator = { needsSelectionUpdate: true, ...insertLineSeparator( currentRecord ) }; + this.onFormatChangeForceChild( insertedLineSeparator ); + } } } else if ( event.shiftKey || ! this.onSplit ) { const insertedLineBreak = { needsSelectionUpdate: true, ...insert( currentRecord, '\n' ) };