Uh oh!
There was an error while loading. Please reload this page.
Remove useMouseIntent in favor of focus-visible - #1157
Conversation
🦋 Changeset detectedLatest commit: eaf89c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/primer-components/BqCatCWg7vQNsDQbkJ64B24oK3ai |
| // can hover states | ||
| @media (hover: hover) { | ||
| body:not(.intent-mouse) .SelectMenu-item:focus, |
There was a problem hiding this comment.
I can't find any instances of the .SelectMenu-item class being used. Possible I overlooked it, but I think this can be removed at this point.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
useMouseIntent was manually watching for keyboard/mouse clicks to determine if focus was triggered by the mouse. There is a new CSS pseudo-class, :focus-visible, which exhibits this exact same behavior. Also pulled in the
focus-visiblepolyfill since browser support isn't complete yet.Merge checklist