chartjs / chartjs/Chart.js

Touch-dragged tooltips do not close on clicks/taps outside the chart

Open
#12,126 1 comment 1 reaction 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Expected behavior

Any clicks/taps outside the chart should close the active tooltip.

### Current behavior

The tooltip remains visible even after tapping outside the chart.

### Reproducible sample

https://www.chartjs.org/docs/latest/samples/bar/stacked.html

### Optional extra steps/info to reproduce

This can be reproduced on some of the official samples, e.g., “Stacked Bar Chart”:
1. Start a touch drag on one of the columns.
2. Drag to another column.
3. Stop the touch drag on this column.
4. Tap ouside of the chart.

This issue only occurs on touch devices, but can also be reproduced on desktop using DevTools’ “device mode” to simulate touch events.

### Possible solution

_No response_

### Context

_No response_

### chart.js version

4.5.0

### Browser name and version

Brave v1.82.172

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.