Skip to content

Commit

Permalink
fix(editor) Do Not Insert In Progress Insertion (#6593)
Browse files Browse the repository at this point in the history
- `resetStateOnBlur` now clears the interaction session without applying
changes and resets the editor mode to select mode.
  • Loading branch information
seanparsons authored and liady committed Dec 13, 2024
1 parent 84f5d56 commit a32dc2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/src/templates/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit a32dc2b

Please sign in to comment.