diff --git a/packages/scm/src/browser/scm-widget.tsx b/packages/scm/src/browser/scm-widget.tsx index 6884c9788cac1..06b1aa9cf0d14 100644 --- a/packages/scm/src/browser/scm-widget.tsx +++ b/packages/scm/src/browser/scm-widget.tsx @@ -150,7 +150,11 @@ export class ScmWidget extends BaseWidget implements StatefulWidget { protected onActivateRequest(msg: Message): void { super.onActivateRequest(msg); this.refresh(); - this.commitWidget.focus(); + if (this.commitWidget.isVisible) { + this.commitWidget.focus(); + } else { + this.node.focus(); + } } protected focusInput(): void {