Version
1.63.0 (also reproduces on current main)
Steps to reproduce
Repo: https://github.com/yuriy-mikityuk/playwright-webkit-nested-details-repro
- npm ci
- npx playwright install
- npx playwright test
The test renders an open <details> inside a closed one and expects the button inside it to be hidden.
Expected behavior
toBeHidden() passes, like in Chromium and Firefox. The button isn't rendered.
Actual behavior
In WebKit the button is reported as visible: isVisible() returns true, getByRole('button') finds it and the aria snapshot includes it.
Additional context
WebKit doesn't use checkVisibility(), and the fallback in isElementStyleVisibilityVisible (packages/injected/src/domUtils.ts) only checks the closest details or summary, so the closed outer one is ignored. I'd like to work on this. I already have a fix with a test in #42951, which I opened before reading the contributing guide, sorry about that.
Environment
System:
OS: macOS 26.7
CPU: (14) arm64 Apple M4 Pro
Binaries:
Node: 20.20.2
npm: 10.8.2
npmPackages:
@playwright/test: 1.63.0 => 1.63.0
Version
1.63.0 (also reproduces on current main)
Steps to reproduce
Repo: https://github.com/yuriy-mikityuk/playwright-webkit-nested-details-repro
The test renders an open
<details>inside a closed one and expects the button inside it to be hidden.Expected behavior
toBeHidden()passes, like in Chromium and Firefox. The button isn't rendered.Actual behavior
In WebKit the button is reported as visible:
isVisible()returns true,getByRole('button')finds it and the aria snapshot includes it.Additional context
WebKit doesn't use
checkVisibility(), and the fallback inisElementStyleVisibilityVisible(packages/injected/src/domUtils.ts) only checks the closest details or summary, so the closed outer one is ignored. I'd like to work on this. I already have a fix with a test in #42951, which I opened before reading the contributing guide, sorry about that.Environment