diff --git a/core/selection.js b/core/selection.js index d3fd19e0bb..80cb4b837f 100644 --- a/core/selection.js +++ b/core/selection.js @@ -43,6 +43,7 @@ class Selection { } }); this.emitter.on(Emitter.events.SCROLL_BEFORE_UPDATE, () => { + if (!this.hasFocus()) return; let native = this.getNativeRange(); if (native == null) return; if (native.start.node === this.cursor.textNode) return; // cursor.restore() will handle