Skip to content

Commit

Permalink
fix #1427
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed May 18, 2017
1 parent 55535b6 commit 0e7a10c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import equal from 'deep-equal';
import extend from 'extend';


const ASCII = /^[ -~]*$/;


class Editor {
constructor(scroll) {
this.scroll = scroll;
Expand Down Expand Up @@ -189,6 +192,7 @@ class Editor {
let oldDelta = this.delta;
if (mutations.length === 1 &&
mutations[0].type === 'characterData' &&
mutations[0].target.data.match(ASCII) &&
Parchment.find(mutations[0].target)) {
// Optimization for character changes
let textBlot = Parchment.find(mutations[0].target);
Expand Down

0 comments on commit 0e7a10c

Please sign in to comment.