tldraw/apps
Mitja Bezenšek 4adbc76e2d
Prevent pressing escape when editing document name to bubble up to the editor (#3725)
This prevents pressing escape to bubble to up to editor when editing
document names. Prevents the current tool to change back to select tool.

### Before

Pressing escape when editing the name stops the editing, but also
switches from hand tool to select tool.


https://github.com/tldraw/tldraw/assets/2523721/445ec4ca-73b9-4db3-a3e8-bd408d868c6f

### After

We no longer switch to hand tool when we press escape the first time.
The second time it still works though.


https://github.com/tldraw/tldraw/assets/2523721/fbab7d97-0d87-47cb-b249-b20655f8bc70

@mimecuvalo happy to wait for your focus management PR to get merged,
then update accordingly by using `editor.focus()`.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Edit document name.
2. Press escape. It should stop editing the document name, but should
not switch the active tool to select tool.
3. Pressing escape once again should do it though. Also keyboard
shortcuts should also work.

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

### Release Notes

- Prevent escaping out of editing the document name to switch the active
tool to select tool.
2024-05-19 13:59:21 +00:00
..
docs Update READMEs, add form link (#3741) 2024-05-12 20:48:07 +00:00
dotcom Prevent pressing escape when editing document name to bubble up to the editor (#3725) 2024-05-19 13:59:21 +00:00
dotcom-asset-upload Bump the npm_and_yarn group group with 7 updates (#2982) 2024-03-04 12:20:23 +00:00
dotcom-bookmark-extractor bump typescript / api-extractor (#2949) 2024-02-25 11:43:17 +00:00
dotcom-worker Move storing of snapshots to R2 (#3693) 2024-05-08 09:06:02 +00:00
examples E2E camera tests (#3747) 2024-05-19 01:02:06 +00:00
health-worker [dx] Allow vscode to search inside md files by default (#3105) 2024-03-11 14:08:04 +00:00
huppy [DX] PR labels revamp (#3112) 2024-03-12 14:53:57 +00:00
vscode focus: rework and untangle existing focus management logic in the sdk (#3718) 2024-05-17 08:53:57 +00:00