Skip to content

Commit

Permalink
fix typing on empty line triggering selection-change
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Apr 13, 2018
1 parent 569f124 commit c7402b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Selection {
native.end.node,
native.end.offset,
);
this.update(Emitter.sources.SILENT);
} catch (ignored) {
// ignore
}
Expand All @@ -59,6 +60,7 @@ class Selection {
if (context.range) {
const { startNode, startOffset, endNode, endOffset } = context.range;
this.setNativeRange(startNode, startOffset, endNode, endOffset);
this.update(Emitter.sources.SILENT);
}
});
this.update(Emitter.sources.SILENT);
Expand Down

0 comments on commit c7402b5

Please sign in to comment.