Skip to content

bug(MatTooltip): Tooltip does not show on longpress for a disabled button #31602

@Socratezz

Description

@Socratezz

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

No response

Description

Disabled buttons do not show a tooltip on a mobile device when you long press, but they do show the tooltip on hover in a desktop browser.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-5mt2bby8?file=src%2Fmain.ts
Steps to reproduce:

  1. Open the stackblitz on a desktop and hover over both buttons - notice the tooltip works for both buttons
  2. Open the stackblitz on a mobile device and long press both buttons - notice the disabled button does not show a tooltip

Expected Behavior

I expect to see consistent workflow so that I can build an app that has the same logic between mobile and desktops.

Actual Behavior

I am able to show users on desktop why the button is disabled, but the same code does not work on mobile and gives the user the impression that the page is broken

Environment

  • Angular: 20
  • CDK/Material: 20
  • Browser(s): latest Chrome and Firefox
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows, Android, iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions