You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tooltip stays open after its trigger is unmounted when ConfigProvider tooltip.unique is enabled #59603
Enable unique tooltips with <ConfigProvider tooltip={{ unique: true }}>.
Render a Button wrapped in a Tooltip that is removed from the page when clicked.
Hover over the button and wait for the tooltip to appear.
While the tooltip is visible, click the button.
import{useState}from"react";import{Button,ConfigProvider,Tooltip}from"antd";exportdefault()=>{const[show,setShow]=useState(true);return(<ConfigProvidertooltip={{unique: true}}>{show&&(<Tooltiptitle="Hello, Ant Design!"><Buttontype="primary"onClick={()=>setShow(false)}>
Click Button
</Button></Tooltip>)}<Buttontype="primary"color="danger"onClick={()=>setShow(true)}>
Reset State
</Button></ConfigProvider>);};
What is expected?
The tooltip should close when its Tooltip and trigger element are unmounted, the same as when tooltip.unique is not enabled.
What is actually happening?
The tooltip popup stays on screen after its trigger element has been removed from the DOM. It only closes after hovering over another element that has a tooltip.
Without tooltip.unique, the same code works correctly.
Hi! I’m investigating this issue and plan to submit a fix with a regression test once I’ve reproduced it. I’ll check that unmounting a Tooltip closes its unique popup without affecting another active tooltip.
@MR-Mostafa For visibility to the maintainers: I already submitted a fix for this issue in react-component/trigger#649 on October 19, following my earlier comment here. That PR remains open and includes 16 regression cases covering controlled/uncontrolled visibility, preserving other active owners, delayed callbacks, StrictMode, and unmounts during popup motion. Its description also records validation against the Ant Design reproduction.
The newly linked react-component/trigger#650 addresses the same issue. Could the maintainers please review the existing #649 and coordinate the overlapping PRs so the earlier implementation and test coverage are considered? I’m available to address review feedback on #649. Linking both here to keep the existing work visible and avoid duplicated effort.
Activity
yulman2207 commentedon Oct 19, 2026
Hi! I’m investigating this issue and plan to submit a fix with a regression test once I’ve reproduced it. I’ll check that unmounting a Tooltip closes its unique popup without affecting another active tooltip.
yulman2207 commentedon Oct 22, 2026
@MR-Mostafa For visibility to the maintainers: I already submitted a fix for this issue in react-component/trigger#649 on October 19, following my earlier comment here. That PR remains open and includes 16 regression cases covering controlled/uncontrolled visibility, preserving other active owners, delayed callbacks, StrictMode, and unmounts during popup motion. Its description also records validation against the Ant Design reproduction.
The newly linked react-component/trigger#650 addresses the same issue. Could the maintainers please review the existing #649 and coordinate the overlapping PRs so the earlier implementation and test coverage are considered? I’m available to address review feedback on #649. Linking both here to keep the existing work visible and avoid duplicated effort.