diff --git a/src/client/sidebar.module.css b/src/client/sidebar.module.css index d47c746..7f21af4 100644 --- a/src/client/sidebar.module.css +++ b/src/client/sidebar.module.css @@ -63,6 +63,22 @@ overflow: clip; } +/* Desktop drag regions ignore pointer-events: the shell's base stylesheet + makes every direct body child `no-drag`, and this viewport-sized layer + inherited it, cancelling every window-drag strip beneath it once the + shell recomputed regions (window drags worked once, then stopped). + Take the host and layer out of the app-region computation; `!important` + because the shell's `body > :not(#root)` selector outranks ours. The + panels themselves stay no-drag so their controls keep receiving clicks. */ +:global(html[data-platform] body > [data-dsh-better-sidebar]), +:global([data-dsh-panel-host]) { + -webkit-app-region: initial !important; +} + +:global([data-dsh-panel-host]) > * { + -webkit-app-region: no-drag; +} + :global([data-dsh-panel-host][data-dsh-panel-host-degraded]) { position: absolute; top: 0; diff --git a/tests/e2e/mount.e2e.ts b/tests/e2e/mount.e2e.ts index 7e6d8fd..69aa766 100644 --- a/tests/e2e/mount.e2e.ts +++ b/tests/e2e/mount.e2e.ts @@ -615,6 +615,16 @@ test('conservative auto: URL stamps alone never modify the layout; plugin chrome return false }) expect(hasNoDragRule, 'the bundle must ship the drag-region opt-out rule').toBe(true) + // The viewport-sized panel host must NOT inherit the shell's blanket + // `body > :not(#root) { no-drag }` — it would cancel every window-drag + // strip beneath it on macOS (issue #772). + const hasHostReset = await page.evaluate(() => { + for (const tag of document.querySelectorAll('style')) { + if (tag.textContent !== null && /\[data-dsh-panel-host\]\{-webkit-app-region:\s*initial\s*!important/.test(tag.textContent)) return true + } + return false + }) + expect(hasHostReset, 'the panel host must opt out of app-region computation').toBe(true) }) test('standard WCO geometry drives the strip reactively (issue #257)', async ({ page }) => {