Skip to content

Commit

Permalink
fix #1029
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Oct 8, 2016
1 parent 566614a commit 7fa48ea
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,14 @@ function modify(source, index, shift, modifier) {
}
let range = this.getSelection();
change = modifier();
if (shift === null) {
range = shiftRange(range, index, change, source);
} else if (shift !== 0) {
range = shiftRange(range, index, shift, source);
if (range != null) {
if (shift === null) {
range = shiftRange(range, index, change, source);
} else if (shift !== 0) {
range = shiftRange(range, index, shift, source);
}
this.setSelection(range, Emitter.sources.SILENT);
}
this.setSelection(range, Emitter.sources.SILENT);
return change;
}

Expand Down

0 comments on commit 7fa48ea

Please sign in to comment.