Add iframe support and fix nested act#1275
Add iframe support and fix nested act#1275snowystinger wants to merge 1 commit intotesting-library:mainfrom
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
We actually just ran into this bug as well with the extra Further, I think any of these code paths calling
I would suggest splitting this PR to address that issue separately. I think the solution can simply stop internally wrapping events in I can work on a repro but I'm hoping that there is already enough evidence to make this change to stop wrapping it. Im also hoping for an answer to the question of if this call is even necessary. |
What
This adds iframe support (next to the already existing shadow dom support) to the active element so that userEvent can fire keyboard events on the correct element. This is particularly important because the event needs to stay within the iframe, it shouldn't ever appear outside of it.
It also removes an extra act which was causing us issues. This may be more of a bug in React, we're a little unsure, but we think this is still more correct here.
Why
We ran into these while developing a feature in adobe/react-spectrum#7561
How
Checklist