diff --git a/packages/ketcher-react/src/script/editor/tool/select.ts b/packages/ketcher-react/src/script/editor/tool/select.ts index ada54ba4e4..6b2955a7cc 100644 --- a/packages/ketcher-react/src/script/editor/tool/select.ts +++ b/packages/ketcher-react/src/script/editor/tool/select.ts @@ -375,7 +375,7 @@ class SelectTool { if (dragCtx && dragCtx.stopTapping) dragCtx.stopTapping() const possibleSaltOrSolvent = struct.sgroups.get(actualSgroupId) - if (SGroup.isSaltOrSolvent(possibleSaltOrSolvent?.item.data.name)) { + if (SGroup.isSaltOrSolvent(possibleSaltOrSolvent?.item.data.name) && dragCtx) { preventSaltAndSolventsMerge(struct, dragCtx, editor) delete this.dragCtx if (this.#lassoHelper.running()) { @@ -629,7 +629,9 @@ function preventSaltAndSolventsMerge( ? fromItemsFuse(struct, null).mergeWith(dragCtx.action) : fromItemsFuse(struct, null) editor.hover(null) - editor.selection(null) + if (dragCtx.mergeItems) { + editor.selection(null) + } editor.update(action) editor.event.message.dispatch({ info: false diff --git a/packages/ketcher-react/src/script/ui/dialog/template/TemplateDialog.tsx b/packages/ketcher-react/src/script/ui/dialog/template/TemplateDialog.tsx index e613074014..fa74b79106 100644 --- a/packages/ketcher-react/src/script/ui/dialog/template/TemplateDialog.tsx +++ b/packages/ketcher-react/src/script/ui/dialog/template/TemplateDialog.tsx @@ -121,30 +121,21 @@ const HeaderContent = () => ( ) const FooterContent = ({ data, tab }) => { - const tabMapping = { - [TemplateTabs.TemplateLibrary]: { - fileName: 'ketcher-tmpls.sdf', - buttonCaption: 'Save template library to SDF' - }, - [TemplateTabs.FunctionalGroupLibrary]: { - fileName: 'ketcher-fg-tmpls.sdf', - buttonCaption: 'Save functional groups to SDF' - }, - [TemplateTabs.SaltsAndSolvents]: null - } - if (!tabMapping[tab]) { - return null + const clickToAddToCanvas = Click to add to canvas + if (tab === TemplateTabs.SaltsAndSolvents) { + return clickToAddToCanvas } return ( -