Skip to content

Commit

Permalink
Fix for #1376. Makes sure that the history stack is up to date when '…
Browse files Browse the repository at this point in the history
…editor-change' events are fired. (#1906)
  • Loading branch information
nikparo authored and jhchen committed Jan 17, 2018
1 parent 0f3130d commit 7d82d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class History extends Module {
change(source, dest) {
if (this.stack[source].length === 0) return;
let delta = this.stack[source].pop();
this.stack[dest].push(delta);
this.lastRecorded = 0;
this.ignoreChange = true;
this.quill.updateContents(delta[source], Quill.sources.USER);
this.ignoreChange = false;
let index = getLastChangeIndex(delta[source]);
this.quill.setSelection(index);
this.stack[dest].push(delta);
}

clear() {
Expand Down

0 comments on commit 7d82d63

Please sign in to comment.