Skip to content

Commit

Permalink
write: do not update if selection does not change
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer committed Feb 13, 2020
1 parent 48b73ce commit 6d81aa9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/write/ui/setup.js
Expand Up @@ -126,6 +126,8 @@ function update() {
var editor = this;
var tr = editor.state.tr;
var sel = tr.selection;
if (this.selection && sel.eq(this.selection)) return;
this.selection = sel;
var parents = filterParents(editor, editor.utils.selectionParents(tr, sel));
var changed = editor.docChanged;
editor.docChanged = false;
Expand Down

0 comments on commit 6d81aa9

Please sign in to comment.