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');