1
0
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:
Gani Georgiev 2023-04-15 11:23:59 +03:00
parent 3423433d01
commit d44c2bb1a9

View File

@ -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