Repository navigation
fix(227901): hotspot tooltips scroll with their panel; version 19.3.9 - #202
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: absoluteso 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
linkTooltipwalks up from the element (or, next to a void element likeinput/img, its parent). The first scroll container (overflow: auto | scroll | overlay) found before any positioned ancestor getsposition: 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, sooverflow: hiddentargets (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;repositionHotspotputs it back when a re-render reset the inline style.Release
Bumps to 19.3.9 (package.json, lock, CHANGELOG,
npm run buildoutput inbuild/andpublished/19.3.9+published/latest), like the earlierchore: versioncommits.Verified
overflow: hidden) heading whose hotspot stays visible next to the ellipsis. The panel getsposition: 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.overflow: hidden, re-anchored children) led to this scroll-container approach.🤖 Generated with Claude Code