We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When 1e8d140 introduced a change to the way .type() behaves, it did not update maxLength handling to take previous text into account.
.type()
maxLength
As a result, if you have an element like this:
<textarea aria-label="input" rows="3" maxlength="10" />
doing the following
const inputField = screen.getByLabelText('input'); await userEvent.type(inputField, '123456'); await userEvent.type(inputField, '123456789101112'); screen.debug();
ends up producing:
<textarea aria-label="input" maxlength="10" rows="3" > 1234561234567891 </textarea>
rather than what you would expect from the browser, namely:
<textarea aria-label="input" maxlength="10" rows="3" > 1234561234 </textarea>
The text was updated successfully, but these errors were encountered:
Thanks for the report. Would you be interested in fixing that?
Sorry, something went wrong.
@kentcdodds sure - took a stab at it. Thanks!
🎉 This issue has been resolved in version 10.3.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
Successfully merging a pull request may close this issue.
When 1e8d140 introduced a change to the way
.type()
behaves, it did not updatemaxLength
handling to take previous text into account.As a result, if you have an element like this:
doing the following
ends up producing:
rather than what you would expect from the browser, namely:
The text was updated successfully, but these errors were encountered: