react icon indicating copy to clipboard operation
react copied to clipboard

Bug: form submission validation of React textarea in Chrome

Open mvicens opened this issue 1 year ago • 0 comments

In Chrome, textareas with minimum length restriction has unexpected behavior when it is form-validated. It seems to be related to this pull request.

Here you have a demo (code example). Steps to reproduce:

  1. Try to submit the 1st form. The browser avoids it and show you alerts.
  2. Fill properly the required controls to achieve submission.
  3. Then, add one letter into not-required controls and tweak them to success again. All controls must be filled and form submitted.

Repeat the same for the React-controlled (2nd) <form>. You will see that the last <textarea> fails. It has to be restricted like its sibling.

React version: 18.3.1 (latest).

mvicens avatar May 14 '24 09:05 mvicens