From 5e6d74428fcd8a2aa6721848b8b4b0718bf124ae Mon Sep 17 00:00:00 2001 From: bchanot Date: Thu, 19 Nov 2026 20:24:36 +0100 Subject: [PATCH] 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. --- apps/app/e2e/shell/editor-geometry.spec.ts | 8 ++++++-- apps/app/src/styles/index.css | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/app/e2e/shell/editor-geometry.spec.ts b/apps/app/e2e/shell/editor-geometry.spec.ts index 141177ba..21533551 100644 --- a/apps/app/e2e/shell/editor-geometry.spec.ts +++ b/apps/app/e2e/shell/editor-geometry.spec.ts @@ -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, } }) } diff --git a/apps/app/src/styles/index.css b/apps/app/src/styles/index.css index ba020bde..96061323 100644 --- a/apps/app/src/styles/index.css +++ b/apps/app/src/styles/index.css @@ -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(