capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.41k stars 207 forks source link

[radio] keyboard navigation not fired when using `react-aria-components` #1605

Open csantos-nydig opened 1 week ago

csantos-nydig commented 1 week ago

Describe the bug

when using RadioGroup from react-aria-components and trying to navigate using keyboard (ArrowDown) the selection does not change.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/stackblitz-starters-erttrv?file=package.json,jsdom.spec.tsx,happy-dom.spec.tsx
  2. Run npm run test
  3. Notice it fails for HAPPY-DOM, but works for JSDOM

Expected behavior I'd expect it to work in HAPPY-DOM

Additional context I don't think this is an error in react-aria-components per se, because their components work fine in JSDOM; but my guess is that they are using some APIs that are not yet supported by HAPPY-DOM

I'm cross-linking both issues, so hopefully we can collaborate and see what needs to be done and where 🙏 https://github.com/adobe/react-spectrum/issues/7358