Skip to content

Commit 919658a

Browse files
Fix event order
1 parent 14beae0 commit 919658a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/dev-playground/src/Main.res

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,9 @@ module App = {
742742
switch Document.current->Document.getElementById("source-editor") {
743743
| Some(editor) => {
744744
let offset = offsetForPosition(Signal.peek(source), original.position)
745-
editor->Element.focus
746745
editor->TextAreaElement.setSelectionRange(offset, offset)
746+
editor->Element.focus
747+
Signal.set(activeLine, original.position.line)
747748
let scrollTop = Math.Int.max(
748749
0,
749750
18 + (original.position.line - 1) * 22 - editor->TextAreaElement.clientHeight / 2,

0 commit comments

Comments
 (0)