chartjs / chartjs/Chart.js

The tooltip is still visible on legend item hover

Open
#11,801 2 comments 0 reactions 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

The tooltip should be closed if I'm hovering on the legend item.

### Current behavior

The tooltip sometimes stays open when I'm hovering the legend item.

![image](https://github.com/chartjs/Chart.js/assets/17402311/8b6ebdeb-f9ba-4f56-b467-fb64bf260dae)

### Reproducible sample

https://codepen.io/teodorachiosa/pen/ZENJEKp

### Optional extra steps/info to reproduce

The issue is easy to see on the Chart.js demo application. One very obvious example is this one:

1. Go to: https://www.chartjs.org/docs/latest/samples/legend/events.html
2. Hover over the "Red" pie slice
3. Quickly hover over the legend item labeled "Green"

Current behavior: The "Red" tooltip is still visible.
![image](https://github.com/chartjs/Chart.js/assets/17402311/8724f681-a8bd-4c60-99e3-041d9dc6aa6b)

### Possible solution

_No response_

### Context

End users might start to confuse the wrong pie slice with the wrong label and value.

### chart.js version

4.4.2
Also reproducing on 4.4.3

### Browser name and version

Chrome 125.0.6422.147

### 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.