Fix full screen issue

This commit is contained in:
Nakul Nagargade 2025-05-27 14:51:25 +05:30
parent 1a7fa9c6ba
commit 0ab48eaab9
2 changed files with 3 additions and 10 deletions

View file

@ -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}

View file

@ -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