commit compras1 2811
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-28 07:11:35 +02:00
parent d58b75c87a
commit eb32c74c56
202 changed files with 17463 additions and 1526 deletions
+12
View File
@@ -0,0 +1,12 @@
export function focusFormError(id: string): boolean {
const target = document.getElementById(id);
if (!target) return false;
let ancestor = target.parentElement;
while (ancestor) {
if (ancestor.tagName === 'DETAILS') ancestor.setAttribute('open', '');
ancestor = ancestor.parentElement;
}
target.focus();
target.scrollIntoView({ block: 'center', behavior: 'auto' });
return true;
}