diff --git a/static/js/managers/CheckpointDownloadManager.js b/static/js/managers/CheckpointDownloadManager.js index a5af71bf..37f4081f 100644 --- a/static/js/managers/CheckpointDownloadManager.js +++ b/static/js/managers/CheckpointDownloadManager.js @@ -36,6 +36,14 @@ export class CheckpointDownloadManager { this.cleanupFolderBrowser(); }); this.resetSteps(); + + // Auto-focus on the URL input + setTimeout(() => { + const urlInput = document.getElementById('checkpointUrl'); + if (urlInput) { + urlInput.focus(); + } + }, 100); // Small delay to ensure the modal is fully displayed } resetSteps() { @@ -178,6 +186,11 @@ export class CheckpointDownloadManager { `; }).join(''); + // Auto-select the version if there's only one + if (this.versions.length === 1 && !this.currentVersion) { + this.selectVersion(this.versions[0].id.toString()); + } + // Update Next button state based on initial selection this.updateNextButtonState(); } diff --git a/static/js/managers/DownloadManager.js b/static/js/managers/DownloadManager.js index b489b69a..24fa7528 100644 --- a/static/js/managers/DownloadManager.js +++ b/static/js/managers/DownloadManager.js @@ -38,6 +38,14 @@ export class DownloadManager { this.cleanupFolderBrowser(); }); this.resetSteps(); + + // Auto-focus on the URL input + setTimeout(() => { + const urlInput = document.getElementById('loraUrl'); + if (urlInput) { + urlInput.focus(); + } + }, 100); // Small delay to ensure the modal is fully displayed } resetSteps() { @@ -182,6 +190,11 @@ export class DownloadManager { `; }).join(''); + // Auto-select the version if there's only one + if (this.versions.length === 1 && !this.currentVersion) { + this.selectVersion(this.versions[0].id.toString()); + } + // Update Next button state based on initial selection this.updateNextButtonState(); }