Tooltip: Properly track hiding and closing for delegated tooltips

Fixes #10602
Closes gh-1353