Skip to content

Disable text selection on break screens#1804

Open
githappens wants to merge 2 commits into
hovancik:trunkfrom
githappens:disable-break-screen-text-selection
Open

Disable text selection on break screens#1804
githappens wants to merge 2 commits into
hovancik:trunkfrom
githappens:disable-break-screen-text-selection

Conversation

@githappens

@githappens githappens commented Jun 18, 2026

Copy link
Copy Markdown

Closes #1805

Requirements

  • issue was opened to discuss proposed changes before starting implementation. Issue [Bug]: Text selection on break screens allows escaping the break (macOS force-click dictionary) #1805 was opened alongside this PR rather than strictly before implementation — happy to discuss before it is merged.
  • during development, node version specified in package.json was used. This is a CSS-only change with no build/runtime Node dependency.
  • package versions and package-lock.json were not changed (npm install --no-save).
  • app version number was not changed.
  • all new code has tests to ensure against regressions. The change is a user-select: none style rule; selectability/force-click behavior is not unit-testable without a macOS UI integration harness, which the project does not currently have.
  • npm run lint reports no offenses. StandardJS lints JS only; no JS changed and the full lint run is clean.
  • npm run test is error-free. All 250 tests pass; a few test files fail to collect locally due to missing optional packages in my environment, unrelated to this change.
  • README and CHANGELOG were updated accordingly.
  • after PR is approved, all commits in it are squashed. Will squash on approval.

Description of the Change

On the break screen, the text content is selectable. On macOS this is an escape hatch out of the break overlay: select a word → force-click (firm trackpad press) to bring up the dictionary / Look Up popover → Open in Dictionary → the Dictionary app opens and you are dropped back to the desktop, bypassing the break without skipping or finishing it. This is especially relevant to strict-mode breaks, whose purpose is to be inescapable.

The fix makes all break-screen content non-selectable in app/css/break.css (loaded by both break.html and microbreak.html, so it covers Mini and Long breaks):

  • * { -webkit-user-select: none; user-select: none; cursor: default; } removes the selection that the force-click dictionary path depends on.
  • ::selection { background: transparent } as a fallback.
  • cursor: pointer is restored on the skip/finish buttons (.breaks > :nth-child(2) > a), which the universal cursor: default would otherwise have flattened.

CSS-only, scoped to the break windows. No behavior change beyond text no longer being selectable during breaks.

Verification Process

  • macOS: triggered Mini and Long breaks and confirmed break text can no longer be selected (double-click, drag) and the force-click dictionary → "Open in Dictionary" escape no longer works.
  • Confirmed the skip/finish buttons still show a pointer cursor and work as before.
  • npm run lint clean.

Other information

The macOS force-click dictionary was the specific reported vector. Disabling selection is cross-platform and harmless elsewhere. Right-click context menu and image drag-out are adjacent hardening opportunities but are intentionally out of scope for this change.

Selecting a word on a break screen lets the user invoke the macOS
force-click dictionary popover and then 'Open in Dictionary', which
escapes the break overlay back to the desktop. Make all break-screen
content non-selectable to close that escape path; keep the pointer
cursor on the skip/finish buttons.
@githappens githappens force-pushed the disable-break-screen-text-selection branch from b9a453e to 1f2338b Compare June 18, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Text selection on break screens allows escaping the break (macOS force-click dictionary)

1 participant