Skip to content

Commit 1a68f8e

Browse files
wolfibDevtools-frontend LUCI CQ
authored andcommitted
[PatchAgent] Set focus when returning from permissions dialog
Bug: 406071340 Change-Id: I99d6dd715c3f85ce9629b975b19f892aca5556c8 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6470014 Auto-Submit: Wolfgang Beyer <wolfi@chromium.org> Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
1 parent d52511d commit 1a68f8e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

front_end/panels/ai_assistance/SelectWorkspaceDialog.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,19 @@ export class SelectWorkspaceDialog extends UI.Widget.VBox {
238238
this.#dialog.hide();
239239
},
240240
onAddFolderButtonClick: () => {
241-
void Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem();
241+
void this.#addFileSystem();
242242
},
243243
onListItemKeyDown: this.#onListItemKeyDown.bind(this),
244244
};
245245

246246
this.#view(viewInput, undefined, this.contentElement);
247247
}
248248

249+
async #addFileSystem(): Promise<void> {
250+
await Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.instance().addFileSystem();
251+
this.contentElement?.querySelector('[aria-label="Select"]')?.shadowRoot?.querySelector('button')?.focus();
252+
}
253+
249254
async #connectToAutomaticFilesystem(): Promise<void> {
250255
const success = await this.#automaticFileSystemManager.connectAutomaticFileSystem(/* addIfMissing= */ true);
251256
// In the success-case, we will receive a 'ProjectAdded' event and handle it in '#onProjectAdded'.

0 commit comments

Comments
 (0)