diff --git a/core/quill.js b/core/quill.js index 26f61ca1d8..c86ab00014 100644 --- a/core/quill.js +++ b/core/quill.js @@ -283,7 +283,9 @@ class Quill { [index, length, , source] = overload(index, length, source); this.selection.setRange(new Range(index, length), source); } - this.selection.scrollIntoView(); + if (source !== Emitter.sources.SILENT) { + this.selection.scrollIntoView(); + } } setText(text, source = Emitter.sources.API) { @@ -394,7 +396,7 @@ function modify(modifier, source, index, shift) { let range = index == null ? null : this.getSelection(); let oldDelta = this.editor.delta; let change = modifier(); - if (range != null && source === Emitter.sources.USER) { + if (range != null) { if (index === true) index = range.index; if (shift == null) { range = shiftRange(range, change, source);