diff --git a/products/ASC.Files/Client/src/HOCs/withFileActions.js b/products/ASC.Files/Client/src/HOCs/withFileActions.js index aa10482c86..990d9dc30c 100644 --- a/products/ASC.Files/Client/src/HOCs/withFileActions.js +++ b/products/ASC.Files/Client/src/HOCs/withFileActions.js @@ -25,7 +25,7 @@ export default function withFileActions(WrappedFileItem) { const { onSelectItem } = this.props; const { id, isFolder } = this.props.item; - id !== -1 && onSelectItem({ id, isFolder }, !isDotsClick); + id !== -1 && onSelectItem({ id, isFolder }, !isDotsClick, true); }; onHideContextMenu = () => { diff --git a/products/ASC.Files/Client/src/store/FilesActionsStore.js b/products/ASC.Files/Client/src/store/FilesActionsStore.js index 1bbb79f805..c04b45c44d 100644 --- a/products/ASC.Files/Client/src/store/FilesActionsStore.js +++ b/products/ASC.Files/Client/src/store/FilesActionsStore.js @@ -493,7 +493,7 @@ class FilesActionStore { } }; - onSelectItem = ({ id, isFolder }, isDotsClick) => { + onSelectItem = ({ id, isFolder }, isDotsClick, isContextItem) => { const { setBufferSelection, setSelected, @@ -522,7 +522,7 @@ class FilesActionStore { setHotkeyCaret(null); setHotkeyCaretStart(null); } - setEnabledHotkeys(false); + isContextItem && setEnabledHotkeys(false); } }; @@ -1243,7 +1243,6 @@ class FilesActionStore { const pathParts = data.selectedFolder.pathParts; const newExpandedKeys = createNewExpandedKeys(pathParts); setExpandedKeys(newExpandedKeys); - }) .catch((err) => { toastr.error(err);