From d06fa2cc6ff7d31c5f9e680dc490a555358f190e Mon Sep 17 00:00:00 2001 From: Roman Rodionov Date: Thu, 21 Mar 2024 17:12:03 +0100 Subject: [PATCH] #4286 - Macro: Editing grid disappears but editing mode is on --- .../src/application/editor/modes/SequenceMode.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/ketcher-core/src/application/editor/modes/SequenceMode.ts b/packages/ketcher-core/src/application/editor/modes/SequenceMode.ts index 659bf53bb0..e31f90643d 100644 --- a/packages/ketcher-core/src/application/editor/modes/SequenceMode.ts +++ b/packages/ketcher-core/src/application/editor/modes/SequenceMode.ts @@ -514,6 +514,13 @@ export class SequenceMode extends BaseMode { previousCaretPosition, nodesToDelete[0][0].nodeIndexOverall, ); + + if ( + SequenceRenderer.caretPosition === 0 && + SequenceRenderer.chainsCollection.chains.length === 0 + ) { + this.startNewSequence(); + } }, }, 'turn-off-edit-mode': {