From 0ab48eaab99d1f35b87c54f65b5ca107a6268863 Mon Sep 17 00:00:00 2001 From: Nakul Nagargade Date: Tue, 27 May 2025 14:51:25 +0530 Subject: [PATCH] Fix full screen issue --- .../AppBuilder/Widgets/ModalV2/Components/Header.jsx | 2 +- .../AppBuilder/Widgets/ModalV2/Components/Modal.jsx | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/AppBuilder/Widgets/ModalV2/Components/Header.jsx b/frontend/src/AppBuilder/Widgets/ModalV2/Components/Header.jsx index 3fcd271833..845b264c01 100644 --- a/frontend/src/AppBuilder/Widgets/ModalV2/Components/Header.jsx +++ b/frontend/src/AppBuilder/Widgets/ModalV2/Components/Header.jsx @@ -31,7 +31,7 @@ export const ModalHeader = React.memo( slotStyle={{ height: `100%`, padding: `${4.5}px ${MODAL_CANVAS_PADDING}px`, - maxHeight: `${headerMaxHeight}`, + maxHeight: isFullScreen ? `${headerMaxHeight}` : `${headerMaxHeight}px`, minHeight: '10px', }} isEditing={isEditing} diff --git a/frontend/src/AppBuilder/Widgets/ModalV2/Components/Modal.jsx b/frontend/src/AppBuilder/Widgets/ModalV2/Components/Modal.jsx index 11656d96f3..7a0669b5c5 100644 --- a/frontend/src/AppBuilder/Widgets/ModalV2/Components/Modal.jsx +++ b/frontend/src/AppBuilder/Widgets/ModalV2/Components/Modal.jsx @@ -40,13 +40,6 @@ export const ModalWidget = ({ ...restProps }) => { ? `calc(${_modalHeight} - ${headerHeight} - 100px - 10px)` : parseInt(_modalHeight, 10) - parseInt(headerHeight, 10) - 100 - 10; - // const headerMaxHeight = `calc(${_modalHeight} - ${footerHeight} - 100px - 10px)`; - // const footerMaxHeight = `calc(${_modalHeight} - ${headerHeight} - 100px - 10px)`; - - // const headerMaxHeight = parseInt(_modalHeight, 10) - parseInt(footerHeight, 10) - 100 - 10; - // const footerMaxHeight = parseInt(_modalHeight, 10) - parseInt(headerHeight, 10) - 100 - 10; - console.log(headerMaxHeight, modalHeight, isFullScreen, 'headerMaxHeight'); - console.log(footerMaxHeight, 'footerMaxHeight'); const updateHeaderSizeInStore = ({ newHeight }) => { const _height = parseInt(newHeight, 10); setComponentProperty(id, `headerHeight`, _height, 'properties', 'value', false); @@ -88,8 +81,8 @@ export const ModalWidget = ({ ...restProps }) => { setTimeout(() => { const modalContent = document.querySelector(`.tj-modal-content-${id}`); if (restProps.show && modalContent) { - console.log(_modalHeight, 'modalContent'); - modalContent.style.height = isFullScreen ? '100vh' : `${modalHeight}px`; + modalContent.style.setProperty('height', _modalHeight, 'important'); + modalContent.style.setProperty('max-height', isFullScreen ? '100%' : modalHeight, 'important'); } }, 100); // eslint-disable-next-line react-hooks/exhaustive-deps