Fixed Bug 67366 for Desktop Editors

This commit is contained in:
Timofey Boyko 2024-04-19 15:25:17 +03:00
parent 27e38fc61d
commit 899a3f5db2
2 changed files with 16 additions and 7 deletions

View File

@ -145,6 +145,10 @@ const Root = ({
selectFileDialogVisible
)
calculateAsideHeight();
if (isSharingDialogVisible) {
setTimeout(calculateAsideHeight, 10);
}
}, [
isSharingDialogVisible,
isVisibleSelectFolderDialog,

View File

@ -230,15 +230,20 @@ export const calculateAsideHeight = () => {
if (viewPort.widgetType === "window") {
const { captionHeight } = viewPort;
const backdrop = document.getElementsByClassName(
"backdrop-active",
)[0] as HTMLElement;
const backdrop =
(document.getElementsByClassName("backdrop-active")[0] as HTMLElement) ??
(document.getElementsByClassName(
"modal-backdrop-active",
)[0] as HTMLElement);
const aside = document.getElementsByTagName("aside")[0];
if (aside && backdrop) {
backdrop.style.height =
aside.style.height = `calc(100dvh - ${captionHeight}px`;
backdrop.style.marginTop = aside.style.top = `${captionHeight}px`;
if (backdrop) {
backdrop.style.height = `calc(100dvh - ${captionHeight}px`;
backdrop.style.marginTop = `${captionHeight}px`;
}
if (aside) {
aside.style.height = `calc(100dvh - ${captionHeight}px`;
aside.style.top = `${captionHeight}px`;
}
}
};