u/HolidayChard9706

flex: 1 collapses in WKWebView but passes in Playwright's WebKit. Your Tauri tests cannot catch this bug class
▲ 5 r/Playwright+1 crossposts

flex: 1 collapses in WKWebView but passes in Playwright's WebKit. Your Tauri tests cannot catch this bug class

I ship a PR review app built on Tauri. Last week a dialog that was green in every test shipped as a header, a clipped search input, and a footer. The body rendered at height zero.

The cause is the flex: 1 shorthand. It expands to flex-basis: 0%, and a percentage basis needs a definite parent height, which an auto-height panel capped by max-height does not have. The spec says the fallback is content. Chromium does that. WebKit keeps the zero.

The part that cost me the evening: Playwright's WebKit is their own recent build, not the WKWebView you actually ship in, and neither engine in my harness reproduced it. Screenshot tests, all green, app broken.

Wrote up the mechanics, the spec citation, and what I changed about testing: https://nodreview.com/blog/wkwebview-flex-collapse/

Fix is flex: 1 1 auto. Curious if anyone has found a CI-friendly way to test against the real system webview, because Playwright clearly is not it.

nodreview.com
u/HolidayChard9706 — 3 days ago