Commit 8b16cf0
committed
fix(autoHeightBridge): normalize measured CSS height and post stable pixel value
- add normalizeHeight() to convert CSS-measured height into device/viewport-adjusted pixels
(uses window.devicePixelRatio and visualViewport.scale, clamps to safe int)
- store raw CSS height in lastCssHeight separately from posted lastHeight
- only post when the normalized height changes to reduce redundant messages
- ensure non-finite/zero values are ignored1 parent 7f9bafe commit 8b16cf0
1 file changed
Lines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
226 | 262 | | |
227 | 263 | | |
228 | 264 | | |
229 | 265 | | |
230 | 266 | | |
231 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
232 | 275 | | |
233 | 276 | | |
234 | 277 | | |
235 | | - | |
| 278 | + | |
236 | 279 | | |
237 | 280 | | |
238 | 281 | | |
239 | 282 | | |
240 | | - | |
| 283 | + | |
241 | 284 | | |
242 | 285 | | |
243 | 286 | | |
| |||
0 commit comments