Repository navigation
Commit 007e631
fix(web): remove first-paint status-bar hairline on iOS PWA (#74)
After reverting to black-translucent, a thin seam still showed at the very
top on a COLD-launched iOS standalone PWA, clearing only after a relayout
(e.g. a back-navigation). Cause (flutter/flutter#84833): Flutter's web
engine sizes its canvas from document.documentElement.clientHeight on the
WebKit path, and that value is briefly unsettled on first paint of a cold
PWA (missing the viewport-fit=cover safe-area adjustment) -> the canvas
paints a few px short of the true top edge for one frame, exposing a
hairline until WebKit settles clientHeight.
Alias clientHeight/clientWidth to the already-correct window.innerHeight/
innerWidth via a synchronous inline script BEFORE flutter_bootstrap.js, so
the very first read is correct. Inert on Chrome/Android (Flutter reads
innerHeight there; getters are configurable and can't throw). Verified the
Blink boot path is unaffected by a headless-Chrome smoke.
Co-Authored-By: Claude Opus 4.8 <[email protected]>1 parent ba391a2 commit 007e631
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
| |||
0 commit comments