Skip to content

fix(ui): use focus-visible instead of focus to prevent sticky hover effect on click#10651

Merged
adamdotdevin merged 2 commits intoanomalyco:devfrom
ProdigyRahul:fix/sticky-focus
Jan 26, 2026
Merged

fix(ui): use focus-visible instead of focus to prevent sticky hover effect on click#10651
adamdotdevin merged 2 commits intoanomalyco:devfrom
ProdigyRahul:fix/sticky-focus

Conversation

@ProdigyRahul
Copy link
Contributor

@ProdigyRahul ProdigyRahul commented Jan 26, 2026

What does this PR do?

fixes the sticky hover effect bug where clicking on toggle/button components caused the hover background to persist until clicking elsewhere. The issue was caused by :focus styles being identical to :hover styles when an element receives focus on click, the focus styling stayed even after the mouse left. changed to :focus-visible which only applies for keyboard navigation, not mouse clicks.

it was staying like this forever:
image
image

How did you verify your code works?

  • clicked ghost buttons, select dropdowns, and session list items
  • moved mouse away and confirmed background returns to normal immediately
  • tested keyboard navigation (Tab) to confirm focus styling still appears for accessibility

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@adamdotdevin adamdotdevin merged commit 783121c into anomalyco:dev Jan 26, 2026
9 checks passed
xenonwellz pushed a commit to xenonwellz/opencode that referenced this pull request Jan 28, 2026
xenonwellz pushed a commit to xenonwellz/opencode that referenced this pull request Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants