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:
1 parent
ccba2932c2
commit
87ce038b19
3 files changed
+14
-2
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
define('APP_NAME', 'hyprcrd');
|
||||
define('APP_VERSION', '1.9.8');
|
||||
define('APP_VERSION', '1.9.9');
|
||||
|
||||
// Database path — writable directory, outside webroot
|
||||
// DB_PATH / UPLOAD_DIR can be pre-defined by the Electron router for app isolation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hyprcrd",
|
||||
"version": "1.9.8",
|
||||
"version": "1.9.9",
|
||||
"description": "hyprcrd — self-hosted card manager",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user