From 137de06e54bf01ee04bb95f0c853639749e37209 Mon Sep 17 00:00:00 2001 From: Fred Sauer Date: Fri, 17 Apr 2026 16:46:19 -0700 Subject: [PATCH] Autofocus GitHub import URL, submit with Enter --- src/ide/sync.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ide/sync.ts b/src/ide/sync.ts index 0aed69af..39905440 100644 --- a/src/ide/sync.ts +++ b/src/ide/sync.ts @@ -94,6 +94,10 @@ export function _importProjectFromGithub(e) { var modal = $("#importGithubModal"); var btn = $("#importGithubButton"); modal.modal('show'); + modal.off('shown.bs.modal').on('shown.bs.modal', () => $("#importGithubURL").trigger('focus')); + $("#importGithubURL").off('keydown').on('keydown', (e) => { + if (e.key === 'Enter') { e.preventDefault(); btn.trigger('click'); } + }); btn.off('click').on('click', () => { var githuburl = $("#importGithubURL").val() + ""; modal.modal('hide');