提交 7595bef5 编写于 作者: J Joao Moreno

fixes #61534

上级 f689e899
......@@ -1153,6 +1153,12 @@ export class SCMViewlet extends PanelViewlet implements IViewModel, IViewsViewle
private onDidChangeRepositories(): void {
toggleClass(this.el, 'empty', this.scmService.repositories.length === 0);
if (this.scmService.repositories.length === 0) {
this.el.tabIndex = 0;
} else {
this.el.removeAttribute('tabIndex');
}
const shouldMainPanelAlwaysBeVisible = this.configurationService.getValue('scm.alwaysShowProviders');
const shouldMainPanelBeVisible = shouldMainPanelAlwaysBeVisible || this.scmService.repositories.length > 1;
......@@ -1184,6 +1190,14 @@ export class SCMViewlet extends PanelViewlet implements IViewModel, IViewsViewle
return (this.mainPanel ? 1 : 0) + this.repositoryPanels.length;
}
focus(): void {
if (this.scmService.repositories.length === 0) {
this.el.focus();
} else {
super.focus();
}
}
setVisible(visible: boolean): void {
super.setVisible(visible);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册