From eb97c36584105b5e26fe3c585ffa833b0098a1d2 Mon Sep 17 00:00:00 2001 From: Konstantin Levin Date: Tue, 29 Nov 2022 18:29:09 +0100 Subject: [PATCH] #1826: do not select a hotkey tool if we are hovering over an atom / eslint --- packages/ketcher-react/src/script/ui/state/hotkeys.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/ketcher-react/src/script/ui/state/hotkeys.js b/packages/ketcher-react/src/script/ui/state/hotkeys.js index 7a5b5295e0..a7eaa73f36 100644 --- a/packages/ketcher-react/src/script/ui/state/hotkeys.js +++ b/packages/ketcher-react/src/script/ui/state/hotkeys.js @@ -78,7 +78,12 @@ function keyHandle(dispatch, state, hotKeys, event) { // in this case we do not want to activate the corresponding tool // and just insert the atom directly const atomProps = { ...newAction.opts } - const updatedAtoms = fromAtomsAttrs(render.ctab, hoverItemId, atomProps, true) + const updatedAtoms = fromAtomsAttrs( + render.ctab, + hoverItemId, + atomProps, + true + ) editor.update(updatedAtoms) } else { dispatch(onAction(newAction)) @@ -193,7 +198,7 @@ function clipData(editor) { if (simpleObjectOrText && window.clipboardData) { errorHandler( 'The structure you are trying to copy contains Simple object or/and Text object.' + - 'To copy Simple object or Text object in Internet Explorer try "Copy as KET" button' + 'To copy Simple object or Text object in Internet Explorer try "Copy as KET" button' ) return null }