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(