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
fix: React onChange/onInput events not triggering on input type="file" file upload #381
fix: React onChange/onInput events not triggering on input type="file" file upload #381
Conversation
Codecov Report
@@ Coverage Diff @@
## master #381 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 387 387
Branches 111 111
=========================================
Hits 387 387
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
@all-contributors please add @ybentz for code and tests |
I've put up a pull request to add @ybentz! 🎉 |
Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the |
🎉 This PR is included in version 12.0.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Fixes #380.
What:
This PR fixes a bug in the
.upload()
function that's very similar to #370. The cause of the bug and the fix are basically the same.Why:
In React, starting with user-event v12 the
onChange
andonInput
callbacks stopped working for<input type="file" />
.How:
Very similar to #370:
bubbles: true
option to the event's options.fireEvent.change
instead offireEvent(input, createEvent('change', ...
.Checklist:
Notes:
As I mentioned in the related issue, we should probably check the rest of the changes in case some other similar functionality broke with the recent changes.