Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pat-inject and pat-validation problem. #1179

Merged
merged 1 commit into from
Oct 16, 2023
Merged

pat-inject and pat-validation problem. #1179

merged 1 commit into from
Oct 16, 2023

Conversation

thet
Copy link
Member

@thet thet commented Sep 8, 2023

Fix a problem with pat-inject and pat-validation where forms with
invalid data could be submitted and the submit button wasn't inactive.
The problem was fixed in two ways:

- pat-inject now has a check for browser-native form validation. Invalid
  forms would not be submitted.

- pat-inject now waits a tick before it get's initialized. Modern
  BasePattern based patterns including pat-validation are all deferred
  for 1 tick by design. pat-inject, being and older Pattern isn't
  deferred and thus initialized before pat-inject. It's initialized
  before pat-validation even though we have some Pattern initialization
  reorganization code in place - pat-inject not being deferred will have
  it's event handlers always run before any others. But now, with the
  1-tick defer in place, pat-inject's event handlers are run in the
  correct order - after pat-validation form validation which in case of
  an invalid form would also deactivate the submit button.
@thet thet merged commit 2f1881d into master Oct 16, 2023
1 check passed
@thet thet deleted the scrum-1455 branch October 16, 2023 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant