Skip to content

fix(pat-tooltip): Do not close a tooltip when pressing in a nested tooltip. - #1317

Merged
thet merged 1 commit into
masterfrom
fix-nested-tooltips
Dec 1, 2026
Merged

thet merged 1 commit into
masterfrom
fix-nested-tooltips

Conversation

@thet

@thet thet commented Dec 1, 2026

Copy link
Copy Markdown
Member

A tooltip opened from within another tooltip's popper is appended to the body, so Tippy treats every press in it as an outside press and hides the outer tooltip. Since 9.12.0-alpha.1 hiding an ajax tooltip destroys the patterns in its content (ADR 0002), which destroys the nested tooltip on mousedown. Links in the nested tooltip could not be clicked anymore and right-clicking them closed both tooltips.

Now pat-tooltip records the pressed element in Tippy's onClickOutside hook and cancels hiding, if it is within a tooltip which was opened from within its own popper, directly or via further nested tooltips.

Ref: ADR 0014

Assisted-by: Claude Opus 5.5

…oltip.

A tooltip opened from within another tooltip's popper is appended to the
body, so Tippy treats every press in it as an outside press and hides the
outer tooltip. Since 9.12.0-alpha.1 hiding an ajax tooltip destroys the
patterns in its content (ADR 0002), which destroys the nested tooltip on
mousedown. Links in the nested tooltip could not be clicked anymore and
right-clicking them closed both tooltips.

Now pat-tooltip records the pressed element in Tippy's onClickOutside
hook and cancels hiding, if it is within a tooltip which was opened from
within its own popper, directly or via further nested tooltips.

Ref: ADR 0014

Assisted-by: Claude Opus 5.5
@thet
thet merged commit 1bf4887 into master Dec 1, 2026
1 check passed
@thet
thet deleted the fix-nested-tooltips branch December 1, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant