mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-02-13 08:24:37 +02:00
removed implicit autofocus as it is causing keyboard navigation issues
This commit is contained in:
parent
3423433d01
commit
d44c2bb1a9
@ -63,13 +63,11 @@
|
||||
|
||||
activeTab = TAB_FORM;
|
||||
|
||||
recordPanel?.show();
|
||||
|
||||
autofocusFirstInput();
|
||||
return recordPanel?.show();
|
||||
}
|
||||
|
||||
export function hide() {
|
||||
recordPanel?.hide();
|
||||
return recordPanel?.hide();
|
||||
}
|
||||
|
||||
async function load(model) {
|
||||
@ -262,23 +260,6 @@
|
||||
|
||||
initialFormHash = "";
|
||||
}
|
||||
|
||||
async function autofocusFirstInput() {
|
||||
await tick();
|
||||
|
||||
if (!isNew) {
|
||||
return;
|
||||
}
|
||||
|
||||
// autofocus the first available form element if no explicit autofocus is found
|
||||
if (!recordForm.querySelector("[autofocus]")) {
|
||||
recordForm
|
||||
?.querySelector(
|
||||
".form-field:not(.noautofocus) input, .form-field:not(.noautofocus) textarea, .form-field:not(.noautofocus) select"
|
||||
)
|
||||
?.focus();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<OverlayPanel
|
||||
|
Loading…
x
Reference in New Issue
Block a user