Fixed Bug 60477 - Files. Fixed blocking of a file opened in preview.

This commit is contained in:
Nikita Gopienko 2023-01-10 12:25:37 +03:00
parent 0d6450bf4f
commit 111fde509b
2 changed files with 9 additions and 3 deletions

View File

@ -298,7 +298,7 @@ class ContextOptionsStore {
)
: null;
this.filesStore.openDocEditor(id, providerKey, tab, urlFormation);
this.filesStore.openDocEditor(id, providerKey, tab, urlFormation, preview);
};
isPwa = () => {

View File

@ -2736,9 +2736,15 @@ class FilesStore {
return folderInfo;
};
openDocEditor = (id, providerKey = null, tab = null, url = null) => {
openDocEditor = (
id,
providerKey = null,
tab = null,
url = null,
preview = false
) => {
const foundIndex = this.files.findIndex((x) => x.id === id);
if (foundIndex !== -1) {
if (foundIndex !== -1 && !preview) {
this.updateSelectionStatus(
id,
this.files[foundIndex].fileStatus | FileStatus.IsEditing,