Open
Description
Reproduction example
https://codesandbox.io/p/github/dansul-WittGruppe/user-event-bug/main
Prerequisites
- Install react-aria
- use a react-aria component that uses
useFocusVisible
hook (e.g. Linear Progress) - wrap the component and import the wrapped component with
React.lazy
- use the wrapped component in a test
Expected behavior
Test will pass.
Actual behavior
Test fails with TypeError: Cannot set property focus of [object HTMLElement] which has only a getter
.
User-event version
14.6.0
Environment
Testing Library framework: @testing-library/react@16.2.0
JS framework: react@19.0.0
Test environment: vitest@3.0.7
DOM implementation: jsdom@26.0.0
Component Library: react-aria-components@1.6.0
Additional context
Version <14.6.0 are working well
No response
Activity
mwdiaz commentedon Mar 10, 2025
I believe this PR (which has been merged but not yet released) will eventually address the issue.
jtrentes commentedon Mar 12, 2025
We have the same issue, do you know when this PR will be released?
focus
andblur
methods on `HTMLElement… #1265