tldraw/packages
Mitja Bezenšek 56e5bfdd71
Stop editing frame headers when clicking inside a frame. (#1955)
Before (notice how we stay in `editing_shape`:


https://github.com/tldraw/tldraw/assets/2523721/d4553675-8412-41d9-b300-bbe87b719caa

After:



https://github.com/tldraw/tldraw/assets/2523721/e9788b1c-f2d9-473d-ba4c-cec7f822547a

It selects the shape, similar to what we do with geo shapes:



https://github.com/tldraw/tldraw/assets/2523721/a6210577-aec0-4fc0-892a-eedfed6f737b


The only downside is that we also stop editing shape if we click on the
frame header. That said that case is currently a bit broken. We'd
probably want to insert caret at the clicked position (which we
currently don't do).

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Insert a frame.
2. Double click the frame header to edit it.
3. Click inside the frame. 
4. This should now stop editing the header.

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

Closes #1965 

### Release Notes

- Stop editing frame headers when clicking inside of a frame.

---------

Co-authored-by: Lu[ke] Wilson <l2wilson94@gmail.com>
2023-09-29 09:27:45 +00:00
..
assets [feature] Add val town embed (#1777) 2023-07-31 15:44:33 +00:00
editor [improvement] improve arrows (for real) (#1957) 2023-09-28 16:13:14 +00:00
state [improvement] More selection logic (#1806) 2023-08-13 15:55:24 +00:00
store Fix shape drag perf (#1932) 2023-09-19 15:29:13 +00:00
tldraw Stop editing frame headers when clicking inside a frame. (#1955) 2023-09-29 09:27:45 +00:00
tlschema Fix arrow handle snapping, snapping to text labels, selection of text labels (#1910) 2023-09-18 14:59:27 +00:00
utils move some utils into tldraw/utils (#1750) 2023-07-19 10:50:40 +00:00
validate Add shapes to exports (#1776) 2023-07-28 16:08:59 +00:00