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:
1 parent
36ed9f980b
commit
5e6d74428f
2 files changed
+8
-3
No files matched your search
@@ -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,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user