-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
@@ -65,7 +65,6 @@ export const listItemStyles = css` | |||
|
|||
// can hover states | |||
@media (hover: hover) { | |||
body:not(.intent-mouse) .SelectMenu-item:focus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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-visible
polyfill since browser support isn't complete yet.Merge checklist