0

When writing a test using @testing-library/react and @testing-library/user-event, I am unable to get userEvent.tab() to work inside of the React Modal component. I think it may have something to do with passing the correct focusTrap argument to the tab function, but I have been unable to get it to work.

Here's a link to a CodeSandbox with a minimum reproduction of the issue: link

How can I use user-event to tab between elements inside of a react-modal?

Danny Harding
  • 1,666
  • 19
  • 25

1 Answers1

0

This appears to have been a bug with user-event, which will be fixed in version 14. Here is a link to an issue with a discussion about this topic https://github.com/testing-library/user-event/issues/820

Danny Harding
  • 1,666
  • 19
  • 25