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
Reproduction example
https://codesandbox.io/p/github/dansul-WittGruppe/user-event-bug/main
Prerequisites
useFocusVisiblehook (e.g. Linear Progress)React.lazyExpected 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
Environment
Testing Library framework:
@testing-library/react@16.2.0JS framework:
react@19.0.0Test environment:
vitest@3.0.7DOM implementation:
jsdom@26.0.0Component Library:
react-aria-components@1.6.0Additional context
Version <14.6.0 are working well
No response