fix: unblock gist and pull request form submissions

This commit is contained in:
tdurieux
2026-09-09 13:41:20 +02:00
parent 3b5d008fef
commit 8e85458b05
5 changed files with 79 additions and 9 deletions
+7 -1
View File
@@ -91,6 +91,12 @@ export function submitForm(event, callback) {
if (el._field?.timer) el._field.commit();
if (el._field) validate(el);
});
if (form && !form.checkValidity()) return;
if (form && !form.checkValidity()) {
const invalid = form.querySelector(":invalid");
invalid?.scrollIntoView?.({ block: "center" });
invalid?.focus();
form.reportValidity();
return;
}
return callback();
}
+6 -6
View File
File diff suppressed because one or more lines are too long