Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/editor/src/optional/ace/ace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,11 @@ export class AceNodeView implements NodeView {

// If the cursor moves and we're in focus, ensure that the cursor is
// visible. Ace's own cursor visiblity mechanisms don't work in embedded
// editors.
// editors. Selection changes we make ourselves (this.updating) don't count:
// those come from ProseMirror syncing its selection into the editor, not
// from the user moving the cursor.
this.aceEditor.getSelection().on('changeCursor', () => {
if (this.dom.contains(document.activeElement) && !this.mouseDown) {
if (!this.updating && this.dom.contains(document.activeElement) && !this.mouseDown) {
this.cursorDirty = true;
}
});
Expand Down
Loading