Skip to content

[Desktop] Tooltip should be shown only on hover #103703

@bleroux

Description

@bleroux

Use case

From the material spec it is explicitly stated that :
“A tooltip is displayed upon tapping and holding a screen element or component (on mobile) or hovering over it (desktop).”.
(https://material.io/components/tooltips#behavior)

The second ‘or’ is important and IMHO could be understood as “on Desktop, the tooltip should only be shown when hovering”. It’s how it works on native Desktop.

A video showing the counter app on Linux :

  • First time the Tooltip is shown when the mouse hovered the FAB.
  • Second time the tooltip is shown when doing a long press on the FAB.
TooltipOnLongPress.mp4

Proposal

Introduce a way to have Tooltip showing only on hover on Desktop.

As it might be a breaking change, one solution could be to add another TooltipTriggerMode (for instance, TooltipTriggerMode.onHover or TooltipTriggerMode.onHoverOnly).

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: desktopRunning on desktopa: fidelityMatching the OEM platforms betterc: new featureNothing broken; request for a new capabilityf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions