Is there an existing issue for this problem?
What happened
A floating window's stored position can change on an axis the user did not move. After the browser viewport shrinks, CSS clamps the window on screen while its stored coordinates remain unchanged. A later vertical-only keyboard move starts from the stored geometry, then commitGeometry persists clampWindowToViewport() output for both axes. If the stored x is outside the smaller viewport, the vertical move also saves the clamped x.
For example, with a 1600 px viewport, place a 500 px-wide window at x=1400. Shrink the viewport to 1200 px: the window renders at x=1152 while its stored x remains 1400. Pressing ArrowDown in the focused title bar saves x=1152 along with the new y. Restoring the wider viewport leaves the window at x=1152 instead of x=1400.
The current main code path is in FloatingWidgetWindow.tsx and clampWindowToViewport.
What you expected to happen
A vertical-only move should preserve the stored x coordinate. A horizontal-only move should preserve y. A viewport-only clamp should not become a saved position on an untouched axis.
How to reproduce the problem
- Open webv2 in a browser viewport about 1600 px wide.
- Float a widget with a window about 500 px wide and move it near the right edge, around x=1400 px.
- Focus the window title bar, then shrink the browser viewport to about 1200 px wide.
- Press ArrowDown once.
- Restore the viewport to 1600 px wide. The window remains near x=1152 px instead of returning to x=1400 px.
Environment
- UI: webv2
- Version: main at
1ddf586e4a365f26d1c98a0ccde031f3d93f3f49
- Install method, OS, and browser: not recorded
- GPU: not relevant to this UI geometry issue
Is there an existing issue for this problem?
What happened
A floating window's stored position can change on an axis the user did not move. After the browser viewport shrinks, CSS clamps the window on screen while its stored coordinates remain unchanged. A later vertical-only keyboard move starts from the stored geometry, then
commitGeometrypersistsclampWindowToViewport()output for both axes. If the stored x is outside the smaller viewport, the vertical move also saves the clamped x.For example, with a 1600 px viewport, place a 500 px-wide window at x=1400. Shrink the viewport to 1200 px: the window renders at x=1152 while its stored x remains 1400. Pressing ArrowDown in the focused title bar saves x=1152 along with the new y. Restoring the wider viewport leaves the window at x=1152 instead of x=1400.
The current main code path is in FloatingWidgetWindow.tsx and clampWindowToViewport.
What you expected to happen
A vertical-only move should preserve the stored x coordinate. A horizontal-only move should preserve y. A viewport-only clamp should not become a saved position on an untouched axis.
How to reproduce the problem
Environment
1ddf586e4a365f26d1c98a0ccde031f3d93f3f49