-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Non-Standard Focus Navigation Behavior in Playwright Browsers #32269
Comments
+1, also facing this! |
I have encountered the same issue on a Mac. I haven't encounted the issue on Linux. It appears like the combobox at the top of chrome remains in a "focused" state even though the browser is tabbing through the page. Here is a recording of the headed version of the test running: The combobox remains in a focused state while tabbing through the content. When it reachs the end of the tabbable content, the combobox should be next in the tab order however it skips over it and lands on Button One, while unfocusing the combobox. A similar issue appears to be happening on Firefox as well. Edge has the same issue as above but since the focus as somewhere else to go in the Edge combobox before the page content, tests don't fail. Playwright version: GitHub Repo: https://github.com/dominiccarrington/playwright-issue
Environment:
|
Any update on this issue? We are still experiencing problems with |
It looks like #31325 is the one who introduced this issue. The problematic part can be found here: playwright/browser_patches/firefox/patches/bootstrap.diff Lines 1155 to 1159 in c9ae644
This change essentially traps focus within the page, making Tab no longer trigger blur when pressed on the last element. One way I found to partially work around the issue is to set |
Version
@playwright/experimental-ct-react: "1.46.1"
Steps to reproduce
npm install
npx playwright install
npx playwright install-deps
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:
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
The text was updated successfully, but these errors were encountered: