Skip to content

fix(227901): hotspot tooltips scroll with their panel; version 19.3.9 - #202

Merged
boehlerlukas merged 3 commits into
masterfrom
fix-227901-hotspot-scroll
Nov 5, 2026
Merged

boehlerlukas merged 3 commits into
masterfrom
fix-227901-hotspot-scroll

Conversation

@LucaB01

@LucaB01 LucaB01 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Ticket #227901 (Hubflo): a hotspot tooltip (the "?" next to a heading) floats over the page when the panel it sits in is scrolled, instead of staying next to its element.

Since 19.3.7 (#196) the hotspot anchor is position: absolute so it does not shift the element's layout. An absolutely positioned box is placed in the nearest positioned ancestor. When the element lives in a scrolling panel (overflow: auto) and that ancestor lies outside the panel, the hotspot keeps its viewport position while the content scrolls away, and only snaps back on a resize or re-render.

Fix

linkTooltip walks up from the element (or, next to a void element like input/img, its parent). The first scroll container (overflow: auto | scroll | overlay) found before any positioned ancestor gets position: relative, so the anchor's containing block scrolls with the content. Nothing changes when a positioned ancestor already sits inside the panel, or when there is no panel (the window scrolls the anchor anyway). The element itself is never touched, so overflow: hidden targets (truncated headings) are not clipped and the element's own absolutely positioned children keep their containing block.

The previous inline value is restored on unlink and on destroy() (which runs on every session change), but only while the inline value is still ours; repositionHotspot puts it back when a re-render reset the inline style.

Release

Bumps to 19.3.9 (package.json, lock, CHANGELOG, npm run build output in build/ and published/19.3.9 + published/latest), like the earlier chore: version commits.

Verified

  • Repro page with a nested scrolling panel: with the published 19.3.8 bundle the heading moved 200px on scroll while the hotspot stayed at the same viewport top; with this build both move together, also for a truncated (overflow: hidden) heading whose hotspot stays visible next to the ellipsis. The panel gets position: relative, the headings keep no inline style.
  • src/GleapTooltipManager.test.js (new): scroll container positioned, element left alone, positioned ancestor inside the panel, no panel, void element, restore on unlink / page-set value kept / destroy, re-apply on reposition. npm test: 599 passed.
  • A second agent reviewed the first version; its two layout findings (clipping on overflow: hidden, re-anchored children) led to this scroll-container approach.

🤖 Generated with Claude Code

LucaB01 and others added 3 commits November 5, 2026 16:05
…ing panels

Since 19.3.7 the hotspot anchor is absolutely positioned so it no longer
shifts the element's layout. An absolutely positioned box sits in the
nearest positioned ancestor; when the tooltip's element lives in a
scrolling panel (overflow: auto) and that ancestor lies outside the panel,
the hotspot stays at its viewport position while the content scrolls away,
until a resize snaps it back.

The element itself (or, next to a void element, its parent) now becomes the
anchor's containing block: `position: relative` is set when it is static,
restored on unlink, and put back when a re-render reset the inline style.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Making the element itself the containing block clipped hotspots on
overflow: hidden targets (truncated headings) and re-anchored the element's
own absolutely positioned children. Walk up from the element instead and
give the first scroll container (overflow auto/scroll) found before any
positioned ancestor position: relative; nothing changes when a positioned
ancestor already sits inside the panel or there is no panel.

Restore only while the inline value is still ours, and restore on destroy()
too (it runs on every session change).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@LucaB01 LucaB01 changed the title fix(227901): hotspot tooltips scroll with their element inside scrolling panels fix(227901): hotspot tooltips scroll with their panel; version 19.3.9 Nov 5, 2026
@boehlerlukas
boehlerlukas merged commit 2c8f9f9 into master Nov 5, 2026
1 check passed
@boehlerlukas
boehlerlukas deleted the fix-227901-hotspot-scroll branch November 5, 2026 16:37
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.

2 participants