diff --git a/packages/ketcher-react/src/script/editor/tool/template.ts b/packages/ketcher-react/src/script/editor/tool/template.ts index 7ae440e8e9..1edc57bb37 100644 --- a/packages/ketcher-react/src/script/editor/tool/template.ts +++ b/packages/ketcher-react/src/script/editor/tool/template.ts @@ -251,8 +251,9 @@ class TemplateTool implements Tool { }); if ( - // if point is functional group and it is not expanded - this.closestItem?.map === 'functionalGroups' && + // if point is functional group/sgroup and it is not expanded + (this.closestItem?.map === 'functionalGroups' || + this.closestItem?.map === 'sgroups') && FunctionalGroup.isContractedFunctionalGroup( this.closestItem.id, this.functionalGroups,