Skip to content

Commit

Permalink
Fix move caret to the end when merging.
Browse files Browse the repository at this point in the history
This avoid moving the caret to the end when two blocks, both with content, are merged.
  • Loading branch information
etoledom committed May 9, 2019
1 parent 1421cdd commit 86894ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ export class RichText extends Component {

// This logic will handle the selection when two blocks are merged or when block is split
// into two blocks
if ( nextTextContent.startsWith( this.savedContent ) && this.savedContent && this.savedContent.length > 0 ) {
if ( nextTextContent === this.savedContent && this.savedContent && this.savedContent.length > 0 ) {
let length = this.savedContent.length;
if ( length === 0 && nextTextContent !== this.props.value ) {
length = this.props.value.length;
Expand Down

0 comments on commit 86894ea

Please sign in to comment.