diff --git a/packages/monaco/src/browser/monaco-quick-open-service.ts b/packages/monaco/src/browser/monaco-quick-open-service.ts index 353ae323fd264..b2da8594d4d8a 100644 --- a/packages/monaco/src/browser/monaco-quick-open-service.ts +++ b/packages/monaco/src/browser/monaco-quick-open-service.ts @@ -135,6 +135,10 @@ export class MonacoQuickOpenService extends QuickOpenService { const widget = this.widget; if (widget.inputBox) { widget.inputBox.inputElement.tabIndex = 1; + // Position the cursor at the end of the input unless a user has made a selection. + if (widget.inputBox.inputElement.selectionStart === widget.inputBox.inputElement.selectionEnd) { + widget.inputBox.inputElement.selectionStart = widget.inputBox.inputElement.value.length; + } } }