mui / mui/material-ui

[Tooltip][material] When open, the Controlled Tooltip does not follow the target object when it is moved

Open
#38,832 12 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

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

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Steps to reproduce 🕹

Link to live example: Codesandbox (repo: m-tartari/material-ui-issue-38832)

Steps:

  1. Install dependencies and start the app:

    npm ci
    npm start
    
  2. Use the button to open/close the sidedrawer.

Current behavior 😯

When open, the tooltip does not follow the target object. Scrolling resets the position

https://github.com/mui/material-ui/assets/37861893/af36e640-c5bd-4847-8cbe-560be546b7ae

Expected behavior 🤔

The Tooltip should move with the target object or refresh its position at the end of the transition.

Context 🔦

I need to display multiple text-free items in a workspace similar to the one in the video. The tooltip is used to display item information on hover but can be set to be always open from the app setting to simplify object tracking.

Your environment 🌎
npx @mui/envinfo
  System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
  Browsers:
    Chrome: 116.0.5845.140
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1 
    @emotion/styled: ^11.11.0 => 11.11.0 
    @mui/core-downloads-tracker:  5.14.8 
    @mui/icons-material: ^5.14.8 => 5.14.8 
    @mui/material: ^5.14.8 => 5.14.8 
    @mui/private-theming:  5.14.8 
    @mui/styled-engine:  5.14.8 
    @mui/system:  5.14.8 
    @mui/types:  7.2.4 
    @mui/utils:  5.14.8 
    @types/react: ^18.2.21 => 18.2.21 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^5.1.6 => 5.1.6 

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.