Open
Description
Version
@playwright/experimental-ct-react: "1.46.1"
Steps to reproduce
- Clone my repo at https://github.com/Aswathprabhu/playwright-demo
- Run
npm install
- Run
npx playwright install
- Run
npx playwright install-deps
- Run
npm run test-ct
Expected behavior
I wrote a simple test that mounts a component rendering an input element and a button.
The expected behavior is as follows:
- Pressing the "Tab" key should focus the input field and verify it is focused.
- Pressing "Tab" again should focus the button and verify it is focused.
- Pressing "Tab" once more should move the focus away from the button, verifying that the focus is now on the body of the page. Normally, after the last focusable element, the focus should return to the body.
Actual behavior
The test case fails in all three browsers (Chromium, WebKit-Mobile and Firefox). In the test, the input field and button correctly receive focus when the "Tab" key is pressed. However, the expected behavior of moving the focus to the body of the page after the button is not occurring. Instead, there is a timeout, failing to transition as anticipated.
Additional context
ScreenShot:

Environment
System:
OS: macOS 14.5
Binaries:
Node: 22.1.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.7.0 - /opt/homebrew/bin/npm
pnpm: 9.6.0 - /usr/local/bin/pnpm
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/experimental-ct-react: ^1.46.1 => 1.46.1