Hello! I've ran into an issue where onBlur handler's are not being fired properly when I try to interact with them using fireEvent and normal actions (like click and tab). If I use fireEvent.focus and fireEvent.blur it works fine, but I'd really prefer testing with the standard events.
I saw what looked like a related issue in #359 but that revolved around the input not having type="text, which I've covered in my use case.
react-testing-library version: 9.1.4react version: 16.9I've created a minimal reproduction case here
Could you clarify why the onBlur handler should be called in the second test case when the element isn't blurred?
Could it be related to this? https://github.com/testing-library/react-testing-library/issues/376#issuecomment-497369928
Yes @msurekci, I believe that's exactly the problem.
I'm afraid there's nothing we can do here. You'll need to fire the blur event manually.
Ah makes sense! @kentcdodds Do you think this would be a candidate to get added to the FAQ or potentially the actions documentation page?
Yes. If you would like to make a pull request to add it I would be grateful!
Most helpful comment
Ah makes sense! @kentcdodds Do you think this would be a candidate to get added to the FAQ or potentially the actions documentation page?