fix(editor): reparent pasted shapes into frame when they land inside one#7938
Merged
steveruizok merged 1 commit intomainfrom Feb 15, 2026
Merged
fix(editor): reparent pasted shapes into frame when they land inside one#7938steveruizok merged 1 commit intomainfrom
steveruizok merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
3dce87c to
2f39382
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
When shapes are pasted with Ctrl+V and no specific point or parent is determined (e.g. nothing selected), the shapes land at the viewport center or their original position but are never checked for whether they visually overlap a frame. This causes z-ordering issues where notes added to the frame appear behind the misparented shapes. After positioning pasted shapes, check whether their center lands inside a frame that can accept children. If so, reparent them into that frame. This mirrors the existing behavior for paste-at-point. Closes #5918
2f39382 to
491d54e
Compare
2 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 16, 2026
In order to keep release documentation current after the v4.3.2 patch release, this PR updates both the archived and next release notes. ### Changes **v4.3.0.mdx:** - Add GitHub release link for v4.3.0 - Add v4.3.1 patch section (draw shape delta encoding precision fix) - Add v4.3.2 patch section (custom shape crop fix) **next.mdx:** - Update `last_version` from v4.3.1 to v4.3.2 - Add bug fix entries for #7938 (paste-into-frame) and #7931 (crop isCircle) ### Change type - [x] `docs` ### Test plan - [ ] Verify release notes render correctly on the docs site ### Release notes - Update release notes with v4.3.1 and v4.3.2 patch entries <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Docs-only updates to markdown release notes; no runtime code changes, with minimal risk beyond potential formatting/rendering issues. > > **Overview** > Updates release documentation to reflect the `v4.3.2` patch. > > Bumps `apps/docs/content/releases/next.mdx` `last_version` to `v4.3.2` and adds two new bug-fix entries (paste-into-frame parenting and a custom-shape cropping crash). > > Extends `apps/docs/content/releases/v4.3.0.mdx` with GitHub release links and a new **Patch releases** section covering `v4.3.1` and `v4.3.2`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ee7dc07. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
huppy-bot bot
pushed a commit
that referenced
this pull request
Feb 16, 2026
In order to keep release documentation current after the v4.3.2 patch release, this PR updates both the archived and next release notes. ### Changes **v4.3.0.mdx:** - Add GitHub release link for v4.3.0 - Add v4.3.1 patch section (draw shape delta encoding precision fix) - Add v4.3.2 patch section (custom shape crop fix) **next.mdx:** - Update `last_version` from v4.3.1 to v4.3.2 - Add bug fix entries for #7938 (paste-into-frame) and #7931 (crop isCircle) ### Change type - [x] `docs` ### Test plan - [ ] Verify release notes render correctly on the docs site ### Release notes - Update release notes with v4.3.1 and v4.3.2 patch entries <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Docs-only updates to markdown release notes; no runtime code changes, with minimal risk beyond potential formatting/rendering issues. > > **Overview** > Updates release documentation to reflect the `v4.3.2` patch. > > Bumps `apps/docs/content/releases/next.mdx` `last_version` to `v4.3.2` and adds two new bug-fix entries (paste-into-frame parenting and a custom-shape cropping crash). > > Extends `apps/docs/content/releases/v4.3.0.mdx` with GitHub release links and a new **Patch releases** section covering `v4.3.1` and `v4.3.2`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ee7dc07. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
Closes #5918
When shapes are pasted (Ctrl+V) and
pasteParentIdresolves to the current page (e.g. nothing is selected, or selected shapes share the page as their common ancestor), shapes are positioned at the viewport center or their original position but no check is made for whether they landed inside a frame. This causes z-ordering confusion: notes added to the frame stay behind the misparented shapes, and sending those shapes to back hides them behind the frame.This PR adds a post-positioning reparent check in
putContentOntoCurrentPage. After shapes are positioned, if the paste parent is the page, we compute the center of all pasted root shapes and usegetShapeAtPointto find a frame at that center — the same approach already used for paste-at-point. If a frame is found, the root shapes are reparented into it. The pasted shapes themselves are excluded from being considered as parents to prevent frame-into-self reparenting.Kapture.2026-02-15.at.00.33.30.mp4
Change type
bugfixTest plan
Release notes
Note
Medium Risk
Changes paste parenting behavior by auto-reparenting shapes after they’re positioned, which can affect hierarchy/z-order outcomes in edge cases with overlapping frames or groups; covered by new unit tests.
Overview
Fixes paste behavior so that when content is pasted onto the page (i.e. no explicit paste parent), the editor post-processes the newly positioned root shapes and automatically reparents any that ended up inside a frame using
getDroppedShapesToNewParents+reparentShapes.Adds unit tests covering reparenting when pasting at viewport center and with
preservePosition, and updates an ordering expectation inpaste.test.tsto reflect the new frame-overlap reparenting behavior.Written by Cursor Bugbot for commit 491d54e. This will update automatically on new commits. Configure here.