Skip to content

[pull] main from tldraw:main#558

Merged
pull[bot] merged 3 commits into
code:mainfrom
tldraw:main
May 24, 2026
Merged

[pull] main from tldraw:main#558
pull[bot] merged 3 commits into
code:mainfrom
tldraw:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 24, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

kaneel and others added 3 commits May 24, 2026 10:22
Closes #8857

Deleting a shape in a group made the reparenting to repop the group at a
different z-index, this should not happen and the group should keep the
same index it previously owned

### Change type

- [x] `bugfix`
- [ ] `improvement`
- [ ] `feature`
- [ ] `api`
- [ ] `other`

### Test plan

Described in #8857

- [ ] Unit tests
- [ ] End to end tests

### Release notes

- Fixed an issue with deleting shapes in a group that caused a
reparenting of the group at a different z-index
In order to let users right-click page items in the page menu without
accidentally starting a drag-to-reorder gesture, this PR ignores
non-primary buttons on the page item drag handle and wires the page
item's `onContextMenu` to open the per-item submenu. The open submenu is
tracked through the editor menu manager so it closes together with the
page menu.

### Change type

- [x] `bugfix`

### Test plan

1. Open the page menu with multiple pages.
2. Right-click on a page item.
3. Confirm the page item's submenu opens (duplicate, move up/down,
delete, etc.).
4. Confirm the pages are not reordered as a result of the right-click.
5. Close the page menu and confirm any open per-item submenu is also
closed.

- [x] End to end tests

### Release notes

- Fixed a bug where right-clicking a page item in the page menu could
start a drag-to-reorder gesture instead of opening the item's submenu.

### API changes
- none

### Code changes

| Section   | LOC change |
| --------- | ---------- |
| Core code | +40 / -1   |
| Tests     | +18 / -0   |
In order to stop edge resize handles from stealing hits near the corners
(#8840), this PR bounds the edge and rotate handle hit geometry in
`SelectionForegroundOverlayUtil`. Edge handles were modeled as unfilled
`Edge2d` lines, which the `OverlayManager` inflates by the global
`hitTestMargin` (8/zoom on each side). That made the edge hit band wider
than the corner box (≈6.75/zoom half-extent), so the edge won hit tests
right at the corner. Edges are now bounded filled `Polygon2d` rectangles
matching the pre-overlay dimensions (`targetSize` per side, ≈4.5/zoom),
restoring the corner-wins-near-corners behavior. The rotate handle
radius is also set to exactly half the corner box width.

### Change type

- [x] `bugfix`

### Test plan

1. Select a shape and move the pointer just outside a corner — the
corner resize cursor should win over the edge cursor.
2. Hover the middle of an edge — the edge resize handle should still be
reachable.
3. Hover a rotate corner — its circular hit area should be half the
corner box width.

- [x] Unit tests

### Release notes

- Fix selection edge resize handles overlapping corner handles, which
made corners hard to grab on small shapes.

### Code changes

| Section   | LOC change |
| --------- | ---------- |
| Core code | +15 / -14  |
| Tests     | +7 / -7    |

Closes #8840
Relates to #8839
@pull pull Bot locked and limited conversation to collaborators May 24, 2026
@pull pull Bot added the ⤵️ pull label May 24, 2026
@pull pull Bot merged commit 71ccc2a into code:main May 24, 2026
@pull pull Bot had a problem deploying to bemo-canary May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-production May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 24, 2026 15:13 Error
@pull pull Bot had a problem deploying to vsce publish May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to npm deploy May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to npm deploy May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to bemo-canary May 24, 2026 15:13 Failure
@pull pull Bot had a problem deploying to deploy-staging May 25, 2026 00:53 Failure
@pull pull Bot temporarily deployed to e2e-dotcom May 25, 2026 02:38 Inactive
@pull pull Bot had a problem deploying to deploy-production May 25, 2026 11:26 Failure
@pull pull Bot had a problem deploying to deploy-staging May 26, 2026 00:51 Failure
@pull pull Bot temporarily deployed to e2e-dotcom May 26, 2026 02:38 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants