diff --git a/packages/frontend/src/styles/app/desktop-title-bar.css b/packages/frontend/src/styles/app/desktop-title-bar.css index 1660a179..81e37885 100644 --- a/packages/frontend/src/styles/app/desktop-title-bar.css +++ b/packages/frontend/src/styles/app/desktop-title-bar.css @@ -20,16 +20,20 @@ .desktop-task-title-bar .app-sidebar-frame-overlay-header { height: 45px; + /* The real Task header owns center controls and native drag handling. */ + pointer-events: none; } .app-sidebar-frame-overlay-header .desktop-title-bar-integrated { height: 45px; } -.desktop-title-bar-integrated .desktop-title-bar-content { +.desktop-title-bar-integrated { pointer-events: none; } +.desktop-title-bar-integrated .desktop-title-bar-sidebar, +.desktop-title-bar-integrated .desktop-title-bar-native-end, .desktop-title-bar-integrated .desktop-caption-buttons { pointer-events: auto; } diff --git a/tests/smoke/desktop-new-task.spec.mjs b/tests/smoke/desktop-new-task.spec.mjs index ae343bcb..21557298 100644 --- a/tests/smoke/desktop-new-task.spec.mjs +++ b/tests/smoke/desktop-new-task.spec.mjs @@ -65,6 +65,18 @@ test("merges an active Task header into Windows chrome", async ({ page }) => { await expect(page.locator(".desktop-title-bar-label")).toHaveCount(0); await expect(page.getByLabel("Window controls", { exact: true })).toBeVisible(); + const taskTitle = page.locator(".task-header-title > strong"); + expect(await taskTitle.evaluate((element) => { + const bounds = element.getBoundingClientRect(); + const hit = document.elementFromPoint(bounds.left + bounds.width / 2, bounds.top + bounds.height / 2); + return Boolean(hit?.closest(".task-header")); + })).toBe(true); + + const permissionPolicy = page.getByRole("button", { name: /Permission handling:/ }); + await permissionPolicy.click(); + await expect(page.getByRole("menu", { name: "Permission handling" })).toBeVisible(); + await page.keyboard.press("Escape"); + const layout = await page.evaluate(() => { const chrome = document.querySelector(".desktop-title-bar-integrated"); const taskHeader = document.querySelector(".task-work-stack-header");