Skip to content

Conversation

@dgreif
Copy link
Member

@dgreif dgreif commented Apr 9, 2021

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

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@dgreif dgreif requested a review from T-Hugs April 9, 2021 18:04
@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2021

🦋 Changeset detected

Latest commit: eaf89c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/components Major

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

@vercel
Copy link

vercel bot commented Apr 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/BqCatCWg7vQNsDQbkJ64B24oK3ai
✅ Preview: https://primer-components-git-remove-mouse-intent-primer.vercel.app

// can hover states
@media (hover: hover) {
body:not(.intent-mouse) .SelectMenu-item:focus,
Copy link
Member Author

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.

Copy link
Contributor

@T-Hugs T-Hugs left a comment

Choose a reason for hiding this comment

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

Thanks!

@vercel vercel bot temporarily deployed to Preview April 15, 2021 19:42 Inactive
@dgreif dgreif enabled auto-merge (squash) April 15, 2021 19:42
@colebemis colebemis mentioned this pull request Apr 15, 2021
@vercel vercel bot temporarily deployed to Preview April 15, 2021 22:42 Inactive
@dgreif dgreif merged commit 5f85394 into main Apr 15, 2021
@dgreif dgreif deleted the remove-mouse-intent branch April 15, 2021 22:45
@github-actions github-actions bot mentioned this pull request Apr 15, 2021
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.

5 participants