Skip to content

Tooltips open on touchmove #2447

@Josh68

Description

@Josh68

Describe the bug
MCT-8250 was opened because users scrolling through Medicare plan search results are seeing tooltips open as they scroll, on mobile devices.

It appears the event handlers for the CMSDS Tooltip might be tweaked to avoid having this happen.

As an example of what might be expected, on a touch device or with touch emulated, try scrolling with a finger on this example from the react-tooltip library.

To Reproduce
Steps to reproduce the behavior:

  1. Go to MCT search results
  2. Click on "Back to drugs and pharmacies," then add at least one drug and a pharmacy or 2
  3. Back on the search results page, on mobile or desktop with devtools open and responsive/mobile mode with touch emulation, try to scroll the page with your finger on some of the tooltip triggers, like the ones that read "Retail pharmacy: Estimated total drug + premium cost"
  4. Tooltips will open as you try to scroll

You can reproduce the same issue on the DS documentation Tooltip page

Expected behavior
Scrolling with a finger should not open tooltips. Tapping on tooltip triggers should open them.

Screenshots

tooltip_touchmove

Desktop (please complete the following information):

  • OS: Mobile, also desktop with responsive/mobile emulation
  • Browser: Chrome
  • Version: Evergreen (latest)

Smartphone (please complete the following information):

  • Device: Replicated on Pixel 4
  • OS: Unknown (assume Android 12 or 13)
  • Browser: Assume stock, Chrome
  • Version: Assume latest

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions