Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Setting selection in correct place when fixing text after mutation.
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkups committed Jan 18, 2018
1 parent 32bf95f commit a1b914a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/input.js
Expand Up @@ -313,9 +313,13 @@ class MutationHandler {
firstChangeAt + deletions
);

// Set range after all made by mutation changes.
const resultRange = ModelRange.createCollapsedAt( parent, firstChangeAt + insertions );

this.editor.execute( 'input', {
text: insertText,
range
range,
resultRange
} );
}

Expand Down

0 comments on commit a1b914a

Please sign in to comment.