Client: open editor in same tab

This commit is contained in:
Viktor Fomin 2024-05-14 17:21:57 +03:00
parent c3ed6fc0ad
commit ebb0e23cae

View File

@ -3819,6 +3819,7 @@ class FilesStore {
};
openDocEditor = (id, preview = false, shareKey = null, editForm = false) => {
const { openEditorInSameTab } = this.filesSettingsStore;
const foundIndex = this.files.findIndex((x) => x.id === id);
const file = foundIndex !== -1 ? this.files[foundIndex] : undefined;
if (
@ -3848,10 +3849,7 @@ class FilesStore {
`/doceditor?${searchParams.toString()}`,
);
window.open(
url,
window.DocSpaceConfig?.editor?.openOnNewPage ? "_blank" : "_self",
);
window.open(url, !openEditorInSameTab ? "_blank" : "_self");
};
createThumbnails = async (files = null) => {