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
type() truncates numbers before the decimal point for number inputs #886
Comments
Thanks for the report ❤️ This seems to be a conflict with Reacts event handling. Works fine with native DOM: https://codesandbox.io/s/hardcore-cdn-luv4rk?file=/src/App.js |
In uncontrolled elements this is just overwritten by the next call. |
For |
This is an issue with Jsdom. It works fine in the browser: |
This is a mixup of Jsdom not implementing |
🎉 This issue has been resolved in version 14.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@all-contributors add @tbertrand7 bug |
I've put up a pull request to add @tbertrand7! 🎉 |
Reproduction example
https://codesandbox.io/s/stoic-snow-vcz5kz
Prerequisites
await user.type(screen.getByTestId('input'), '12.55')
)Expected behavior
12.55 is typed into the number input.
Actual behavior
The numbers before the decimal point are truncated and 55 is typed into the number input.
User-event version
14.0.0
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
No response
The text was updated successfully, but these errors were encountered: