Skip to content

fix(TopNav): a mouse slide across TopNavMenu's action items selects no text - #8807

Merged
cixzhang merged 1 commit into
mainfrom
fix/topnavmenu-action-rows-no-selection
Oct 28, 2026
Merged

cixzhang merged 1 commit into
mainfrom
fix/topnavmenu-action-rows-no-selection

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

User impact

Someone sliding a mouse across TopNavMenu's action items (items with an onClick and no href), which it tracks as a held pointer since #8791, selected the item text. The selection stayed after the lift. Link items never selected text. With this change, action items select none either.

Change

  • userSelect: 'none' on TopNavMenu's menu. Its menu holds only its own items, so no caller content is affected.
  • A new Action Items TopNavMenu story, because no story had items without destinations.
  • A real-Chromium case in NavMenusSlideSelection.a11y.chromium.spec.ts (fix(core): a mouse slide across NavHeadingMenu or TabMenu items selects no text #8802). A mouse presses the first action item's title and slides to the second; nothing may be selected while held or after the lift.
  • A patch changeset.

Evidence

Chrome 156, the built Storybook with the new story:

  • Main without the fix: the case fails, with "Invite teammates" selected while held and after the lift.
  • This head: it passes, and the spec's other four cases pass too.

Authority

family:action-groups FR1–FR2 (the slide is the gesture) and component:TopNavMenu FR11. CodeBunny noted this on #8802 at a5b3d4b.

…o text

TopNavMenu's menu takes userSelect none, so a held pointer sliding across
action items (onClick, no href) starts no text selection; link items never
did. A new Action Items story and a real-Chromium case in
NavMenusSlideSelection.a11y.chromium.spec.ts cover it. Follow-up to #8791
and #8802.
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 28, 2026 12:50pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 28, 2026
@astracat-bot

astracat-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 28, 2026, 1:23 PM UTC

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/NavHeadingMenu 13.0KB 13.0KB 0B 3.3KB 3.3KB 0B
core/TopNav 52.5KB 52.5KB 0B 10.5KB 10.5KB 0B
core/TopNavHeading 58.6KB 58.6KB 0B 10.2KB 10.2KB 0B
core/TopNavItem 9.0KB 9.0KB 0B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 55.0KB 55.0KB 0B 11.0KB 11.0KB 0B
core/TopNavMegaMenuFeaturedCard 6.7KB 6.7KB 0B 3.4KB 3.4KB 0B
core/TopNavMegaMenuItem 9.1KB 9.1KB 0B 4.1KB 4.1KB 0B
core/TopNavMenu 58.3KB 58.3KB +15B 10.3KB 10.3KB 0B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 35.4KB 35.4KB 0B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 506 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 558,840
RichTextEditor Markdown parity: side by side probe light 540,756
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ready to merge: userSelect: 'none' on TopNavMenu's menu stops a mouse slide across action items from selecting their text, matching the other menus, while the slide still acts once on the item it lifts on. The new Chromium case's slide leaves text selected without the fix and the case passes with it, so nothing else is needed.

[Automated review]

@cixzhang
cixzhang merged commit 7824f29 into main Oct 28, 2026
75 checks passed
@github-actions
github-actions Bot deleted the fix/topnavmenu-action-rows-no-selection branch October 31, 2026 06:09

This branch was successfully deployed

1 active deployment
Preview — f81aa491 Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant