Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/vs/workbench/contrib/chat/browser/chatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,9 @@ export class ChatWidget extends Disposable implements IChatWidget {

if (numItems === 0) {
this.refreshHistoryList();
if (!dom.isAncestorOfActiveElement(this.container)) {
this.focusInput();
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ export class GettingStartedPage extends EditorPane {
return '';
}

private async selectStep(id: string | undefined, delayFocus = true) {
private async selectStep(id: string | undefined, delayFocus = true, firstLaunch = false) {
if (id) {
let stepElement = this.container.querySelector<HTMLDivElement>(`[data-step-id="${id}"]`);
if (!stepElement) {
Expand All @@ -782,7 +782,9 @@ export class GettingStartedPage extends EditorPane {
}
}
});
setTimeout(() => (stepElement as HTMLElement).focus(), delayFocus && this.shouldAnimate() ? SLIDE_TRANSITION_TIME_MS : 0);
if (!firstLaunch) {
setTimeout(() => (stepElement as HTMLElement).focus(), delayFocus && this.shouldAnimate() ? SLIDE_TRANSITION_TIME_MS : 0);
}

this.editorInput.selectedStep = id;

Expand Down Expand Up @@ -952,7 +954,7 @@ export class GettingStartedPage extends EditorPane {
this.currentWalkthrough = first;
this.editorInput.selectedCategory = this.currentWalkthrough?.id;
this.editorInput.walkthroughPageTitle = this.currentWalkthrough.walkthroughPageTitle;
this.buildCategorySlide(this.editorInput.selectedCategory, undefined);
this.buildCategorySlide(this.editorInput.selectedCategory, undefined, true /* firstLaunch */);
this.setSlide('details', true /* firstLaunch */);
return;
}
Expand Down Expand Up @@ -1388,7 +1390,7 @@ export class GettingStartedPage extends EditorPane {
super.clearInput();
}

private buildCategorySlide(categoryID: string, selectedStep?: string) {
private buildCategorySlide(categoryID: string, selectedStep?: string, firstLaunch?: boolean) {
if (this.detailsScrollbar) { this.detailsScrollbar.dispose(); }

this.extensionService.whenInstalledExtensionsRegistered().then(() => {
Expand Down Expand Up @@ -1531,7 +1533,7 @@ export class GettingStartedPage extends EditorPane {
reset(this.stepsContent, categoryDescriptorComponent, stepListComponent, this.stepMediaComponent, categoryFooter);

const toExpand = category.steps.find(step => this.contextService.contextMatchesRules(step.when) && !step.done) ?? category.steps[0];
this.selectStep(selectedStep ?? toExpand.id, !selectedStep);
this.selectStep(selectedStep ?? toExpand.id, !selectedStep, firstLaunch);

this.detailsScrollbar.scanDomNode();
this.detailsPageScrollbar?.scanDomNode();
Expand Down
Loading