Skip to content

Hovering over a menu item in React versions < 18 cause a focus-ring to flicker #5626

@joshwooding

Description

@joshwooding

Latest version

  • I have tested the latest version

Description

This is a fun one, we received a bug report that hovering on a menu item causes a focus-ring to flicker into existence:

20250926-1922-16.6927621.mp4

After a fun debugging session this is caused due to a timing issue where :focus-visible is applied by the browser due to focusOnHover being true before :hover is applied which then removes the focus-ring style

https://github.com/jpmorganchase/salt-ds/blame/3ad2fc43d7f069ead1d493ee8ea9ea67f9ac5841/packages/core/src/menu/MenuItem.css#L24-L26

Steps to reproduce

.

Expected behavior

No response

Package name(s)

Core (@salt-ds/core)

Package version(s)

No response

Browser

  • Chrome
  • Safari
  • Firefox
  • Microsoft Edge

Operating system

  • macOS
  • Windows
  • Linux
  • iOS
  • Android

Are you a JPMorgan Chase & Co. employee?

  • I am an employee of JPMorgan Chase & Co.

Metadata

Metadata

Assignees

Labels

status: awaiting triageAutomatically added to new issues. Should be removed once they have been triaged.

Type

Projects

Status

Green

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions