diff --git a/docs/releases/unreleased.md b/docs/releases/unreleased.md index 22adf4238..3a310a602 100644 --- a/docs/releases/unreleased.md +++ b/docs/releases/unreleased.md @@ -34,4 +34,6 @@ When a change has user-facing documentation, include a canonical tasknotes.dev l ## Fixed +- (#2301) Fixed clicking the Pomodoro timer display to edit its duration. Thanks to @minnyee for reporting and identifying the cause. + - (#2328) Fixed direct status edits on occurrence notes not updating the recurring parent’s completion history or creating the next occurrence when configured. Thanks to @mudnug for reporting this. diff --git a/styles/pomodoro-view.css b/styles/pomodoro-view.css index be5c8c35e..1e63dd1ad 100644 --- a/styles/pomodoro-view.css +++ b/styles/pomodoro-view.css @@ -117,6 +117,7 @@ /* Timer Display */ .tasknotes-plugin .pomodoro-view__timer-display { + pointer-events: auto; font-size: 3.5rem; color: var(--tn-text-normal); text-align: center; @@ -141,6 +142,7 @@ } .tasknotes-plugin .pomodoro-view__timer-input { + pointer-events: auto; width: 5.5em; border: none; border-radius: var(--tn-radius-sm); diff --git a/tests/unit/issues/issue-2301-pomodoro-pointer.test.ts b/tests/unit/issues/issue-2301-pomodoro-pointer.test.ts new file mode 100644 index 000000000..c33f0a064 --- /dev/null +++ b/tests/unit/issues/issue-2301-pomodoro-pointer.test.ts @@ -0,0 +1,19 @@ +import fs from "fs"; +import path from "path"; + +const css = fs.readFileSync(path.resolve(__dirname, "../../../styles/pomodoro-view.css"), "utf8"); + +function block(name: string): string { + return css.match(new RegExp(`\\.tasknotes-plugin \\.pomodoro-view__${name}\\s*\\{([^}]*)\\}`))?.[1] ?? ""; +} + +describe("Issue #2301: Pomodoro duration pointer targets", () => { + it.each(["timer-display", "timer-input"])("restores pointer targeting on %s", (name) => { + expect(block(name)).toMatch(/pointer-events:\s*auto;/); + }); + + it("keeps the overlay click-through and adjustment buttons interactive", () => { + expect(block("timer-overlay")).toMatch(/pointer-events:\s*none;/); + expect(block("time-controls")).toMatch(/pointer-events:\s*auto;/); + }); +});