[Bug]: Headless Firefox gives every element `scrollbar-width: none`, whatever the page sets
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- playwright, typescript
- 领域
- backend, testing-qa
调研方向
Start with browser_patches/firefox/juggler/content/hidden-scrollbars.css and how Juggler.js registers that stylesheet for headless Firefox. Run the linked reproduction with Node 20 or later to confirm the computed values across browsers. Done when headless Firefox reports the page's specified scrollbar-width values while keeping scrollbars hidden.
由索引模型根据 Issue 内容生成。
描述
Version
main (28c4b2e), with the Firefox it pins, 159.0
Steps to reproduce
- Clone https://github.com/YevheniiKotyrlo/playwright-firefox-headless-scrollbar-width
- Run
node repro.mjswith Node 20 or later and git. It clonesmain, runsnpm ciandnpm run build, installs the browsersmainpins, and in Chromium, Firefox and WebKit, each launched headless, sets this page and readsgetComputedStyle(element).getPropertyValue('scrollbar-width')for<html>and each<div>:
<!doctype html>
<style>div { width: 100px; height: 50px; overflow: auto } p { height: 200px }</style>
<div style="scrollbar-width: auto"><p></p></div>
<div style="scrollbar-width: thin"><p></p></div>
<div style="scrollbar-width: none"><p></p></div>
<div style="scrollbar-width: thin !important"><p></p></div>
Expected behavior
Each element reads the scrollbar-width the page gives it, as in headless Chromium and WebKit: auto for <html>, which sets no scrollbar-width (the initial value), then auto, thin, none and thin. The scrollbars can stay hidden: headless Chromium hides them with --hide-scrollbars and reads the page's values.
Actual behavior
Headless Firefox reads none for every element, thin !important included:
microsoft/playwright 28c4b2e, Chromium 159.0.8154.6, Firefox 159.0, WebKit 27.2, each headless; Node v26.12.1, win32 10.0.26300 x64
element expected chromium firefox webkit
<html>, which sets no scrollbar-width auto auto none auto
<div style="scrollbar-width: auto"> auto auto none auto
<div style="scrollbar-width: thin"> thin thin none thin
<div style="scrollbar-width: none"> none none none none
<div style="scrollbar-width: thin !important"> thin thin none thin
summary: microsoft/playwright 28c4b2e: headless Firefox 159.0 reads scrollbar-width none for 4 of the 4 elements that should read auto or thin; headless Chromium 159.0.8154.6 and WebKit 27.2 read the expected value for all 5 elements
Additional context
The value comes from hidden-scrollbars.css, which Juggler.js registers as a user-agent style sheet when Firefox runs headless.
Environment
microsoft/playwright 28c4b2e, Chromium 159.0.8154.6, Firefox 159.0, WebKit 27.2, each headless; Node v26.12.1, win32 10.0.26300 x64
- 主要语言
- TypeScript
- 星标
- 100k
- 派生
- 6.9k
- 平均合并
- 16 小时 8 分钟
- 30 天内合并 PR
- 281
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/playwright 的其他 Issue
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)未关闭
难度 2/5 1-3 小时 新手友好度 62/100
microsoft/playwright#44289 ·
维护者通常 1 天内回复
-
agent-triage-done
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/playwright#44264 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
microsoft/playwright#44290 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 22/100
microsoft/playwright#44288 ·
维护者通常 1 天内回复
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)未关闭
难度 5/5 一周以上 新手友好度 12/100
microsoft/playwright#44287 ·
维护者通常 1 天内回复
查看 microsoft/playwright 的全部 Issue
相似的 Issue
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
难度 2/5 1-3 小时 新手友好度 76/100
openclaw/openclaw#203385 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
nwverse/persona#12800 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
good first issue
难度 2/5 半天 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
WISE-Community/WISE-Client#2404 ·
维护者通常 1 天内回复