diff --git a/packages/ketcher-react/src/script/ui/component/cliparea/cliparea.jsx b/packages/ketcher-react/src/script/ui/component/cliparea/cliparea.jsx index c386f5ffb5..b3510e9fbf 100644 --- a/packages/ketcher-react/src/script/ui/component/cliparea/cliparea.jsx +++ b/packages/ketcher-react/src/script/ui/component/cliparea/cliparea.jsx @@ -214,6 +214,7 @@ async function copy(data) { const clipboardItem = new ClipboardItem(clipboardItemData); + // Chrome: clipboardItem.presentationStyle is undefined if ( clipboardItem.presentationStyle && clipboardItem.presentationStyle === 'unspecified' @@ -228,7 +229,7 @@ async function copy(data) { } } catch (e) { KetcherLogger.error('cliparea.jsx::copy', e); - console.info(`Could not write exact type ${data && data.toString()}`); + console.info(`Could not write exact type ${JSON.stringify(data)}`); } } diff --git a/packages/ketcher-react/src/script/ui/state/hotkeys.ts b/packages/ketcher-react/src/script/ui/state/hotkeys.ts index 4c8a756b98..30c8ff60da 100644 --- a/packages/ketcher-react/src/script/ui/state/hotkeys.ts +++ b/packages/ketcher-react/src/script/ui/state/hotkeys.ts @@ -397,7 +397,7 @@ async function clipData(editor: Editor) { ? ChemicalMimeType.Mol : ChemicalMimeType.Rxn; - res['text/plain'] = data; + res['text/plain'] = ket; res[type] = data; return res;