fix(tooltip): dismiss floating tooltip when its trigger is hidden without pointer events - #6354
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview While a tooltip is visible, Adds jsdom tests for the watcher (visible trigger, hidden/unmounted trigger, ancestor hidden, pointer leave). Reviewed by Cursor Bugbot for commit 0edcfb5. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR fixes floating tooltips that linger after their trigger becomes hidden or unmounted without generating a pointer event.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the fallback now checks computed display across the trigger’s ancestor chain, and the tests exercise both direct and ancestor display-none cases.
|
| Filename | Overview |
|---|---|
| packages/emcn/src/components/tooltip/tooltip.tsx | Adds active-trigger tracking and a visibility watcher; the revised fallback resolves the previously reported direct and ancestor display: none cases. |
| packages/emcn/src/components/tooltip/tooltip.test.tsx | Adds focused fallback-path coverage for hidden and removed triggers without introducing a remaining behavioral defect related to the previous thread. |
Reviews (2): Last reviewed commit: "fix(tooltip): catch display: none trigge..." | Re-trigger Greptile
…hout pointer events
12f37d3 to
ab08b3e
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0edcfb5. Configure here.
Summary
visibility: hiddenwith no pointer movement, and Safari/WebKit never re-firespointerleavewhen the hovered element is CSS-hidden, so the portaled tooltip never dismissedcheckVisibility(), computed-visibility fallback for Safari < 17.4 / jsdom)Type of Change
Testing
Checklist