♻️ fix: editing is not terminated after the conversion is confirmed. (#1885)
closes: #1883 Fix bug: editing is not terminated after the conversion is confirmed. ### before https://github.com/tldraw/tldraw/assets/24749358/7821a8b1-70a8-448f-802b-2a791c2fe159 ### after https://github.com/tldraw/tldraw/assets/24749358/2104f3bd-75c5-4551-bd41-315957d1a533 ### Change Type - [x] `patch` — Bug fix - [ ] `minor` — New feature - [ ] `major` — Breaking change - [ ] `dependencies` — Changes to package dependencies[^1] - [ ] `documentation` — Changes to the documentation only[^2] - [ ] `tests` — Changes to any test code only[^2] - [ ] `internal` — Any other changes that don't affect the published package[^2] - [ ] I don't know [^1]: publishes a `patch` release, for devDependencies use `internal` [^2]: will not publish a new version ### Test Plan 1. Add a step-by-step description of how to test your PR here. 2. - [ ] Unit Tests - [ ] End to end tests ### Release Notes - fix: editing is not terminated after the conversion is confirmed. Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
3b3a0b29fe
commit
cc3bd1d114
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ export const FrameLabelInput = forwardRef<
|
|||
|
||||
const handleKeyDown = useCallback(
|
||||
(e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key === 'Enter') {
|
||||
if (e.key === 'Enter' && !e.nativeEvent.isComposing) {
|
||||
// need to prevent the enter keydown making it's way up to the Idle state
|
||||
// and sending us back into edit mode
|
||||
e.stopPropagation()
|
||||
|
|
Loading…
Reference in a new issue