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
1 changed files with 2 additions and 21 deletions

View File

@ -63,13 +63,11 @@
activeTab = TAB_FORM; activeTab = TAB_FORM;
recordPanel?.show(); return recordPanel?.show();
autofocusFirstInput();
} }
export function hide() { export function hide() {
recordPanel?.hide(); return recordPanel?.hide();
} }
async function load(model) { async function load(model) {
@ -262,23 +260,6 @@
initialFormHash = ""; 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> </script>
<OverlayPanel <OverlayPanel