Skip to content

Commit

Permalink
Add { scroll: false } when resetting user cursor to prevent jump when…
Browse files Browse the repository at this point in the history
… other clients update
  • Loading branch information
hesselbom committed Nov 3, 2020
1 parent a2dcb73 commit bb52fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/y-codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const typeObserver = (binding, event) => {
head = anchor
anchor = tmp
}
cm.setSelection(cm.posFromIndex(anchor), cm.posFromIndex(head))
cm.setSelection(cm.posFromIndex(anchor), cm.posFromIndex(head), { scroll: false })
})
}

Expand Down

0 comments on commit bb52fa5

Please sign in to comment.