Skip to content

bug(button, list): Regression: Hover state persists on touch devices for buttons and selectable components in v15+ #31841

@gonzalad

Description

@gonzalad

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14

Description

Starting from Angular Material v15, hover states remain on touch devices after releasing buttons, list items, and other interactive components. This worked correctly in v14.

Environment:

  • Angular Material v15+ (regression from v14)

  • Mobile devices (iOS/Android)

  • Chrome Mobile, Safari Mobile

References:

Reproduction

  1. Button:
    • On mobile, visit the Button demo
    • Tap a “Basic Text” button.
    • After releasing, the button background remains in the hover state. Touching another part of the UI restores it.
  2. List:
    • On mobile, visit the List with Selection demo
    • Select a list item.
    • Tap the same item again and release. The hover background remains until another UI element is touched.

Expected Behavior

Hover state should be removed immediately after releasing a touch.

Actual Behavior

Hover styles persist until another UI element is tapped.

Environment

  • Angular:
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: manyArea label for issues related to many components

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions