Skip to content

fix(snapshot): keep the selection bar off Android's own menu - #6640

Closed
tomeredlich wants to merge 1 commit into
mainfrom
claude/android-selection-bar-overlap
Closed

fix(snapshot): keep the selection bar off Android's own menu#6640
tomeredlich wants to merge 1 commit into
mainfrom
claude/android-selection-bar-overlap

Conversation

@tomeredlich

@tomeredlich tomeredlich commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Problem

On Android, Chrome's native selection menu (Copy / Share / Select all) renders over our selection bar — see the report: both land in the space above the highlighted text.

That menu is browser chrome, not our DOM. There is no event to cancel and no CSS to suppress it; the only thing that removes it is user-select: none, which would also remove the selection the feature is built on. So this avoids the collision instead of hiding the menu.

Change

On a coarse pointer, the bar prefers the space below the selection, clearing the drag handles Android hangs under it. This anti-correlates the two: the platform menu only moves below the quote when there is no room above, and that is exactly the case where our bar goes above. Mouse placement is unchanged.

Verification

  • packages/shared snapshot suites: 7 suites / 44 tests pass, including a new case asserting the bar sits below the quote under (pointer: coarse).
  • eslint + strict typecheck guard on the changed files: clean.

Worth a real-device check on the preview before merge — the handle clearance is a fixed 32px and Android's handle size varies with display density.

🤖 Generated with Claude Code

Preview domain

https://claude-android-selection-bar-ove.preview.app.daily.dev

The platform draws its Copy/Share menu above a selection whenever there is
room, which is the slot the bar was picking too. Preferring the other side on
a coarse pointer anti-correlates the two: Android only moves below the quote
when there is no room above, and that is the case where the bar goes above.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Sep 10, 2026 3:22pm UTC

Request Review

@tomeredlich

Copy link
Copy Markdown
Contributor Author

Folded into #6638 — same file, same feature, easier to review as one.

@tomeredlich
tomeredlich deleted the claude/android-selection-bar-overlap branch September 10, 2026 15:20
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.

1 participant