Conversation
…om viewport Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
huppy-bot bot
pushed a commit
that referenced
this pull request
Mar 9, 2026
…om viewport (#8171) When the tooltip singleton's trigger element has an ancestor with a CSS `transform` (e.g. `transform3d`), `position: fixed` positions relative to that ancestor's containing block rather than the viewport. Since `getBoundingClientRect()` always returns viewport-relative coordinates, directly using those values as `left`/`top` produces incorrect positioning. This PR fixes the issue by first placing the trigger at `(0, 0)`, reading back the containing block's offset via `getBoundingClientRect()`, and then subtracting that offset to compute the correct CSS position. ### Change type - [x] `bugfix` ### Test plan 1. Embed tldraw inside a container that uses `transform: translate3d(...)` or similar CSS transform 2. Hover over toolbar buttons and other tooltip-bearing elements 3. Verify tooltips appear correctly positioned next to their target elements ### Release notes - Fixed tooltip positioning when tldraw is rendered inside a container with CSS transforms. Made with [Cursor](https://cursor.com) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk UI-only change that adjusts how tooltip trigger `left`/`top` are computed; main risk is minor regressions in edge-case layout/positioning. > > **Overview** > Fixes incorrect tooltip placement when `tldraw` is rendered inside a transformed/offset containing block by adjusting the singleton trigger’s `position: fixed` coordinates. > > The trigger is now temporarily placed at `(0,0)`, its containing-block offset is read via `getBoundingClientRect()`, and that offset is subtracted from the target element’s viewport rect to compute the correct `left`/`top`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d384470. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 task
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
In order to publish the v4.5.0 release notes and record the v4.4.1 patch, this PR archives release notes and resets `next.mdx` for the next cycle. **v4.5.0.mdx** (new file): - Archived from `next.mdx` with full frontmatter, keywords, and GitHub release link - Featured sections: click-through on transparent image pixels (#7942), breaking `EmbedShapeUtil.configure()` change (#8034) - API changes: `Editor.getResizeScaleFactor()` (#8042), `TLImageAsset.pixelRatio` (#8163), `sanitizeSvg` (#7896), `experimental__onDropOnCanvas` (#7911), enum-to-const refactoring (#8084) - 6 improvements and 20 bug fixes from production **v4.4.0.mdx:** - Add v4.4.1 patch release section with tooltip positioning fix (#8171) - Add v4.4.1 to keywords **next.mdx:** - Reset with `last_version: v4.5.0` and empty content ### Change type - [x] `other` ### Code changes | Section | LOC change | | ------------- | ------------- | | Documentation | +128 / -107 |
huppy-bot bot
pushed a commit
that referenced
this pull request
Mar 18, 2026
In order to publish the v4.5.0 release notes and record the v4.4.1 patch, this PR archives release notes and resets `next.mdx` for the next cycle. **v4.5.0.mdx** (new file): - Archived from `next.mdx` with full frontmatter, keywords, and GitHub release link - Featured sections: click-through on transparent image pixels (#7942), breaking `EmbedShapeUtil.configure()` change (#8034) - API changes: `Editor.getResizeScaleFactor()` (#8042), `TLImageAsset.pixelRatio` (#8163), `sanitizeSvg` (#7896), `experimental__onDropOnCanvas` (#7911), enum-to-const refactoring (#8084) - 6 improvements and 20 bug fixes from production **v4.4.0.mdx:** - Add v4.4.1 patch release section with tooltip positioning fix (#8171) - Add v4.4.1 to keywords **next.mdx:** - Reset with `last_version: v4.5.0` and empty content ### Change type - [x] `other` ### Code changes | Section | LOC change | | ------------- | ------------- | | Documentation | +128 / -107 |
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.
When the tooltip singleton's trigger element has an ancestor with a CSS
transform(e.g.transform3d),position: fixedpositions relative to that ancestor's containing block rather than the viewport. SincegetBoundingClientRect()always returns viewport-relative coordinates, directly using those values asleft/topproduces incorrect positioning.This PR fixes the issue by first placing the trigger at
(0, 0), reading back the containing block's offset viagetBoundingClientRect(), and then subtracting that offset to compute the correct CSS position.Change type
bugfixTest plan
transform: translate3d(...)or similar CSS transformRelease notes
Made with Cursor
Note
Low Risk
Low risk UI-only change that adjusts how tooltip trigger
left/topare computed; main risk is minor regressions in edge-case layout/positioning.Overview
Fixes incorrect tooltip placement when
tldrawis rendered inside a transformed/offset containing block by adjusting the singleton trigger’sposition: fixedcoordinates.The trigger is now temporarily placed at
(0,0), its containing-block offset is read viagetBoundingClientRect(), and that offset is subtracted from the target element’s viewport rect to compute the correctleft/top.Written by Cursor Bugbot for commit d384470. This will update automatically on new commits. Configure here.