mui / mui/material-ui

[tooltip] Does not close with an IconButton trigger

Open
#47,073 51 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

scope: tooltip type: bug
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Reproduction: https://codesandbox.io/p/sandbox/kycq4t

Steps to reproduce

Steps:

  1. Mouse over a tooltip trigger very quickly

https://github.com/user-attachments/assets/57b85941-686f-4c15-826c-915eb0346705


Description

MUI Tooltip's onClose event doesn't fire reliably when tooltips

Current behavior

Per screen recording

Expected behavior
  • It closes
Outdated ### Context

Similar issues noticed however resolutions suggested there didn't work - https://github.com/mui/material-ui/issues/27057, https://stackoverflow.com/questions/50122739/material-ui-tooltip-stays-open-after-triggered-dialog-is-closed

Technical Details
  • Issue appears to be related to event propagation conflicts between tooltip and dropdown components
  • Virtualization may be affecting event handling
  • Rapid mouse movements trigger the issue more frequently
  • Multiple tooltips in close proximity exacerbate the problem
Workarounds Attempted
  • Using open prop for controlled tooltips
  • Adding stopPropagation() and preventDefault()
  • Implementing global tooltip state management
  • Using setTimeout delays for onClose
  • None of these approaches fully resolve the issue
Your environment
  • MUI Version: 6.1.9
  • React Version: 18.3.1
  • Browser: Chrome, Firefox, Safari (all affected)
  • OS: Windows, macOS, Linux (all affected)
npx @mui/envinfo
    System:
    OS: macOS 15.6.1
  Binaries:
    Node: 23.11.0 - /opt/homebrew/bin/node
    npm: 8.19.4 - /Users/Downloads/node_modules/.bin/npm
    pnpm: 10.18.2 - /Users/Library/pnpm/pnpm
  Browsers:
    Chrome: 141.0.7390.77
    Edge: Not Found
    Firefox: 129.0.1
    Safari: 18.6
  npmPackages:
    @emotion/react: 11.10.0 => 11.10.0 
    @emotion/styled: 11.10.0 => 11.10.0 
    @mui/material: ^6.1.9 => 6.4.12 
    @types/react: 18.3.11 => 18.3.11 
    react: 18.3.1 => 18.3.1 
    react-dom: 18.3.1 => 18.3.1 
    typescript: ^5.7.3 => 5.8.3 

Search keywords: Tooltip, react-select, virtualized lists, onClose

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.