Skip to content

Releases: practical-computer/mrujs

1.0.3-rc1

09 Apr 00:31
808d8cb

Choose a tag to compare

1.0.3-rc1 Pre-release
Pre-release

Full Changelog: https://github.com/practical-computer/mrujs/commits/1.0.3-rc1

Don't disable buttons if form is using browser validation + invalid

  • If a form is using the browser's Constraint Validation API to
    provide interactive validation errors, we should not disable a
    button on the form as part of the Mrujs remote submission.
    • This is because the browser will automatically prevent submission
      on its own, and present the errors for the user to correct
  • If we do not early-return in disableFormElement in this case, the
    form becomes locked and cannot be submitted because its submit
    buttons are disabled.
  • We need to check if the form has its noValidate set to true,
    otherwise we do not disable the button if the form has bypassed
    the constraint validation API (and is still invalid according to
    form.checkValidity)