test(tests): a sideways scroll attempt proves no overflow; margin comment

scrollWidth against clientWidth hid an overflow up to the scrollbar
gutter's width; the probe now tries to scroll sideways. The drawing
place's margin comment names the pinned column's exception.
This commit is contained in:
bchanot committed 2026-11-19 20:24:36 +01:00
1 parent 36ed9f980b
commit 5e6d74428f
2 files changed
+8 -3

No files matched your search

+6 -2
View File
@@ -623,7 +623,11 @@ function columnGeometry(page: Page) {
drawing.x + drawing.width / 2,
drawing.y + 2,
)
const root = document.documentElement
// A sideways scroll attempt moves the page only if something overflows (scrollWidth
// against clientWidth hides up to the scrollbar gutter's width).
window.scrollTo(100, window.scrollY)
const sideways = window.scrollX > 0
window.scrollTo(0, window.scrollY)
return {
top: box.top,
bottom: box.bottom,
@@ -631,7 +635,7 @@ function columnGeometry(page: Page) {
canvasTopPainted: !!hit && canvas.contains(hit),
// Not capped: the canvas box still runs to the column's right edge.
canvasFills: Math.abs(frame.right - box.right) < 0.5,
sideways: root.scrollWidth > root.clientWidth,
sideways,
}
})
}
+2 -1
View File
@@ -42,7 +42,8 @@ body,
handles, the canvas box, tools, view chips, the aside's controls: a Tab walk probed them
under the strip, rev 4 I-3), except the strip's own commands, whose focus must not
scroll, and a dialog's controls, which scroll inside the dialog. The place is `hidden`
while another section shows, and the strip is sticky from 1 024 px only. */
while another section shows, and the strip is sticky from 1 024 px only. Where the
drawing column is pinned (block below), its controls take the bar's margin instead. */
@media (min-width: 1024px) {
[data-place='annotations.drawing']:not([hidden])
:is(