Skip to content

[pull] main from tldraw:main#492

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

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

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 10, 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 : )

In order to keep the release notes current with v4.5.8 (the latest patch
release), this updates the `last_version` field in `next.mdx` from
`v4.5.7` to `v4.5.8`. Source is `production` (3+ weeks since v4.5.0
minor release).

No new SDK-relevant entries were needed — #8490 (paste fallback fix) was
skipped because it fixes a regression from #8347 which is new in this
release cycle. All existing entries remain valid on the production
branch.

### Change type

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

### Code changes

| Domain | Description |
|---|---|
| Documentation | Update `last_version` in next.mdx to v4.5.8 |

### Test plan

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

### Release notes

- Update release notes.
…or pointermove (#8519)

Closes #8517

In order to fix the opacity slider drag being broken on Safari, this PR
replaces the capturing-phase `stopPropagation()` on `pointermove` events
in `DefaultStylePanel` with `editor.markEventAsHandled()`.

The style panel previously used a capturing-phase `pointermove` listener
that called `event.stopPropagation()` to prevent the canvas from
reacting to pointer moves over the style panel. This interfered with
Radix UI Slider's internal pointer capture handling on Safari — Radix
relies on `pointermove` events propagating to the element that called
`setPointerCapture`, and Safari handles pointer capture event
propagation differently from Chrome/Firefox when `stopPropagation` is
called in the capture phase.

The canvas's `document.body` pointermove listener already checks
`editor.wasEventAlreadyHandled(e)` and returns early, so
`markEventAsHandled` achieves the same goal without breaking DOM event
propagation.

### Change type

- [x] `bugfix`

### Test plan

1. Open tldraw in **Safari**
2. Create or select a shape
3. Open the style panel
4. Drag the opacity slider — it should follow the pointer smoothly
5. Verify in **Chrome** and **Firefox** that the slider still works
6. Verify that moving the pointer over the style panel does not cause
canvas reactions (e.g. hover states on shapes behind the panel)

### Release notes

- Fix opacity slider drag not working on Safari.

### Code changes

| Section    | LOC change |
| ---------- | ---------- |
| Core code  | +7 / -5    |
…mode (#8520)

Closes #8500

`editor.inputs.getCurrentScreenPoint()` already returns coordinates
relative to the viewport screen bounds (the subtraction happens in
`InputsManager.updateFromEvent`). However, `ZoomQuick` was subtracting
`vsb.x`/`vsb.y` a second time in both `onEnter` (anchor calculation) and
`getNextVpb` (brush positioning). This caused the zoom anchor and brush
rectangle to be offset by the container's page position when the tldraw
container wasn't at `(0, 0)` of the window.

### Change type

- [x] `bugfix`

### Test plan

1. Embed tldraw in a page where the container is offset from `(0, 0)`
(e.g. with a header or sidebar above it)
2. Activate the zoom tool (Z) and hold Shift to enter quick zoom mode
3. Verify the cursor stays fixed on screen during the overview zoom-out
4. Drag to reposition — the brush rectangle should follow the cursor
exactly

- [x] Unit tests

### Release notes

- Fix quick zoom mode (Z + Shift) cursor anchor and brush misalignment
when the tldraw container is offset from the top-left of the window.

### Code changes

| Section    | LOC change |
| ---------- | ---------- |
| Core code  | +2 / -3    |
| Tests      | +41 / -0   |
@pull pull Bot locked and limited conversation to collaborators Apr 10, 2026
@pull pull Bot added the ⤵️ pull label Apr 10, 2026
@pull pull Bot merged commit 989d9d5 into code:main Apr 10, 2026
@pull pull Bot had a problem deploying to deploy-production April 10, 2026 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 10, 2026 21:13 Error
@pull pull Bot had a problem deploying to vsce publish April 10, 2026 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 10, 2026 21:13 Failure
@pull pull Bot had a problem deploying to deploy-staging April 11, 2026 00:34 Failure
@pull pull Bot temporarily deployed to e2e-dotcom April 11, 2026 02:36 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.

1 participant