[pull] main from tldraw:main#492
Merged
Merged
Conversation
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 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )