From 8d0124cc16d51be23f855345637714f26ceb054f Mon Sep 17 00:00:00 2001 From: Sean Parsons Date: Fri, 25 Oct 2024 17:39:51 +0100 Subject: [PATCH] fix(editor) Do Not Insert In Progress Insertion - `resetStateOnBlur` now clears the interaction session without applying changes and resets the editor mode to select mode. --- editor/src/templates/editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/src/templates/editor.tsx b/editor/src/templates/editor.tsx index c31c2a933d5d..74de72b62d77 100644 --- a/editor/src/templates/editor.tsx +++ b/editor/src/templates/editor.tsx @@ -135,6 +135,7 @@ import { omitWithPredicate } from '../core/shared/object-utils' import { getParserWorkerCount } from '../core/workers/common/concurrency-utils' import { canMeasurePerformance } from '../core/performance/performance-utils' import { getChildGroupsForNonGroupParents } from '../components/canvas/canvas-strategies/strategies/fragment-like-helpers' +import { EditorModes } from '../components/editor/editor-modes' if (PROBABLY_ELECTRON) { let { webFrame } = requireElectron() @@ -412,7 +413,8 @@ export class Editor { this.boundDispatch( [ EditorActions.clearHighlightedViews(), - CanvasActions.clearInteractionSession(true), + CanvasActions.clearInteractionSession(false), + EditorActions.switchEditorMode(EditorModes.selectMode(null, false, 'none')), EditorActions.updateKeys({}), EditorActions.closePopup(), EditorActions.clearPostActionData(),