fix(desktop): keep the chat scrollbar off the right-sidebar sash
The vertical sash grab band sat 1px into the leading pane and stole the Windows overlay-scrollbar hit target. Keep the 8px band entirely on the trailing side of the seam.
This commit is contained in:
@@ -96,3 +96,23 @@ describe('the main placement floor in the renderer', () => {
|
||||
expect(zoneWrapper('grp-tools')?.style.display).toBe('none')
|
||||
})
|
||||
})
|
||||
|
||||
describe('vertical sash vs leading-pane scrollbar (#99867)', () => {
|
||||
it('keeps the grab band entirely in the trailing pane', () => {
|
||||
const tree = split('row', [
|
||||
group(['sessions'], { id: 'grp-sessions' }),
|
||||
group(['workspace'], { id: 'grp-main' })
|
||||
])
|
||||
|
||||
$layoutTree.set(tree)
|
||||
render(<TreeSplit node={tree} root rootRow />)
|
||||
|
||||
const sashes = document.querySelectorAll('[data-sash-overlap="trailing"]')
|
||||
|
||||
expect(sashes.length).toBeGreaterThan(0)
|
||||
for (const sash of sashes) {
|
||||
expect(sash.className).toContain('w-[8px]')
|
||||
expect(sash.className).not.toContain('-translate-x-[1px]')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -812,14 +812,15 @@ function Sash({
|
||||
<div
|
||||
className={cn(
|
||||
'group absolute z-20 [-webkit-app-region:no-drag]',
|
||||
// Asymmetric grab band: only 1px reaches into the leading pane so its
|
||||
// edge-hugging 8px scrollbar stays clickable (the old centered 9px band
|
||||
// swallowed it entirely — the pointer got col-resize instead of the
|
||||
// thumb). The trailing side keeps a generous 7px reach; total grab
|
||||
// width stays ~8px so the sash is no harder to hit.
|
||||
horizontal ? 'inset-y-0 left-0 w-[8px] -translate-x-[1px]' : 'inset-x-0 top-0 h-[8px] -translate-y-[1px]',
|
||||
// Grab band lives entirely in the trailing pane. A 1px overlap into
|
||||
// the leading pane (the previous asymmetric band) still stole the
|
||||
// Windows overlay-scrollbar hit target on the chat — only ~3px of
|
||||
// thumb remained clickable (#99867). The sash stays 8px wide, all
|
||||
// on the sidebar/tool side of the seam.
|
||||
horizontal ? 'inset-y-0 left-0 w-[8px]' : 'inset-x-0 top-0 h-[8px]',
|
||||
disabled ? 'pointer-events-none' : horizontal ? 'cursor-col-resize' : 'cursor-row-resize'
|
||||
)}
|
||||
data-sash-overlap="trailing"
|
||||
onDoubleClick={disabled ? undefined : onDoubleClick}
|
||||
onPointerDown={disabled ? undefined : onPointerDown}
|
||||
role="separator"
|
||||
|
||||
Reference in New Issue
Block a user