mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-12 13:48:58 +02:00
fix: unblock gist and pull request form submissions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Vendored
+6
-6
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user