mirror of
https://github.com/pretix/pretix.git
synced 2026-09-14 16:24:43 +00:00
[A11y] Form JavaScript: Support for <button formnovalidate> (#6536)
This commit is contained in:
@@ -233,6 +233,7 @@ let form_handlers = function (el) {
|
||||
|
||||
function setup_basics (el) {
|
||||
el.find('form').attr('novalidate', true).on('submit', function (e) {
|
||||
if (e.originalEvent.submitter.formNoValidate) return;
|
||||
if (!this.checkValidity()) {
|
||||
let input = this.querySelector(':invalid:not(fieldset)');
|
||||
(input.labels[0] || input).scrollIntoView()
|
||||
|
||||
Reference in New Issue
Block a user