Skip to content

Commit ac31e3b

Browse files
ElenaStoevaqn895
authored andcommitted
[Console] Fix autoselecting last request (elastic#218001)
Fixes elastic#194257 ## Summary This PR fixes the bug in Console where, if there is a request on the last line of the editor, it gets automatically selected when the editor is open. This is because the cursor is initially placed at the last position of the edition, and if this position turn out to be at the end of the request, the request is selected because the editor is on focus. We fix this by not focusing the editor initially (i.e. there is no blinking cursor when you open the editor) - this ensures that there won't be any initial request highlighting as per the logic on the following line: https://github.com/elastic/kibana/blob/5c78ff18484e77b5ec5a4ba2ab341ed65db4f21c/src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.ts#L73) https://github.com/user-attachments/assets/6f10e59b-92c7-4501-bf01-54987bc2f289
1 parent bc1b0f9 commit ac31e3b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/platform/plugins/shared/console/public/application/containers/editor/monaco_editor_actions_provider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export class MonacoEditorActionsProvider {
6464
private setEditorActionsCss: (css: CSSProperties) => void,
6565
private isDevMode: boolean
6666
) {
67-
this.editor.focus();
6867
this.parsedRequestsProvider = getParsedRequestsProvider(this.editor.getModel());
6968
this.highlightedLines = this.editor.createDecorationsCollection();
7069

0 commit comments

Comments
 (0)