Skip to content

Commit 472cf4f

Browse files
committed
Focus the simple editor when jumping to a line
1 parent c95179c commit 472cf4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ui/frontend/Editor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class SimpleEditor extends React.PureComponent<CommonEditorProps> {
7575
const offsets = new CodeByteOffsets(this.props.code);
7676
const [startBytes, endBytes] = offsets.lineToOffsets(newPosition.line);
7777

78+
editor.focus();
7879
editor.setSelectionRange(startBytes, endBytes);
7980
}
8081
}

0 commit comments

Comments
 (0)