diff --git a/editor/src/templates/editor.tsx b/editor/src/templates/editor.tsx index 74de72b62d77..0f5f22c96362 100644 --- a/editor/src/templates/editor.tsx +++ b/editor/src/templates/editor.tsx @@ -410,11 +410,15 @@ export class Editor { } resetStateOnBlur = (): void => { + const currentMode = this.storedState.patchedEditor.mode + this.boundDispatch( [ EditorActions.clearHighlightedViews(), CanvasActions.clearInteractionSession(false), - EditorActions.switchEditorMode(EditorModes.selectMode(null, false, 'none')), + ...(currentMode.type === 'insert' + ? [EditorActions.switchEditorMode(EditorModes.selectMode(null, false, 'none'))] + : []), EditorActions.updateKeys({}), EditorActions.closePopup(), EditorActions.clearPostActionData(),