fix(mosaic): keep menu items from showing focus rings on mouse hover - #9986
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 69dd987 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour. 📝 WalkthroughWalkthroughMenuInner now configures Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: ⚪ Minimal · up to No actionable user-facing regression is established by the reviewed change; the test coverage gap does not by itself demonstrate incorrect menu behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Description
Menus opened with the mouse showed keyboard focus rings on items as they were hovered.
The menu opened on
mousedownthrough floating-ui'suseClick, which callspreventDefault()on that mousedown so the trigger never receives focus from the press. With no mouse focus recorded, the browser treats the focus the menu then moves by script (to the popup, and to each hovered item) as keyboard-driven, so every item matched:focus-visible.The menu still opens on press, but now handles a mouse or pen
pointerdownon the trigger itself without preventing the default, so the trigger takes focus from the press and the focus that follows inherits "not visible".useClickkeeps handling keyboard and touch. Arrow-key navigation still shows the ring. This matches how Base UI opens its menus.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change