v145 · android

Show true window position on Android

window.screenX, screenY, outerWidth, and outerHeight now report the real position and size of the browser window on Android. Used to always be (0,0) regardless of where the window actually was — wrong for tablets in freeform windowing mode.

concepts

  1. Window Coordinates

    Live readout of window.screenX, screenY, outerWidth, and outerHeight. Updates as you move or resize the browser window — on Android tablets, you should now see the actual screen position change.

  2. Popup placement math

    Snap a colour-picker popup to the right edge of this window using screenX + outerWidth. Diagram shows where the popup will land. On legacy Android the calc always pointed at the screen origin.

  3. Before / after Android

    16% of page loads read screenX — and every one of those reads was wrong on Android. Side-by-side comparison of legacy values vs the real Chrome 145+ values, plus a catalogue of what broke silently.

  4. Multi-window Layout

    Live virtual screen map that draws the browser window at its true position. Open positioned popups at the right edge, below, or at screen center using coordinates derived from screenX + outerWidth — the calculation that was always wrong on pre-145 Android.

why it shipped

For most of Android's history, the browser window WAS the screen — full-bleed, top-left at (0,0). So Chrome on Android reported screenX = screenY = 0 always, and nothing noticed. Then Android tablets got freeform windowing. Suddenly browsers could be moved around the screen, but Chrome kept reporting the legacy zeros, and any web app that did multi-window math or remembered window position got it wrong. Reporting the true position brings Android in line with desktop browsers.

references