new-bucket dialog: Enter in name field submits

Typing a name and hitting Enter did nothing — users had to move to
the Create button. Wire Enter on the name input to click the submit
path so the common flow is keyboard-only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
thandClaude Opus 4.6 committed 2026-04-15 21:23:57 +02:00
1 parent ccba2932c2
commit 87ce038b19
3 files changed
+14 -2

No files matched your search

@@ -392,6 +392,18 @@ async function createBucketDialog() {
}
});
// Enter in the name field = Create (users expect the submit path
// without reaching for the mouse). Stop propagation so nothing
// upstream grabs it. No-op if name is empty — the submit button's
// own handler validates.
overlay.querySelector('#__cb_name').addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
e.preventDefault();
e.stopPropagation();
overlay.querySelector('.collab-btn-submit').click();
}
});
setTimeout(() => overlay.querySelector('#__cb_name')?.focus(), 50);
});
}