Prevent pressing escape when editing document name to bubble up to the editor #3725
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.
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.
CleanShot.2024-05-08.at.15.37.33.mp4
After
We no longer switch to hand tool when we press escape the first time. The second time it still works though.
CleanShot.2024-05-08.at.15.51.09.mp4
@mimecuvalo happy to wait for your focus management PR to get merged, then update accordingly by using
editor.focus()
.Change Type
sdk
— Changes the tldraw SDKdotcom
— Changes the tldraw.com web appdocs
— Changes to the documentation, examples, or templates.vs code
— Changes to the vscode plugininternal
— Does not affect user-facing stuffbugfix
— Bug fixfeature
— New featureimprovement
— Improving existing featureschore
— Updating dependencies, other boring stuffgalaxy brain
— Architectural changestests
— Changes to any test codetools
— Changes to infrastructure, CI, internal scripts, debugging tools, etc.dunno
— I don't knowTest Plan
Release Notes