We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Max-Height being applied dynamically

We're using the ejs-dialog on a number of screens to pop a confirmation. We are not setting the max-height on either screen, however at render both screens have a max-height applied at element.style. This seems to be calculated, perhaps from the size of the form, however it's very different number from one screen to the next. 15px in one case and 259 in another. In the case of 15px it can't be overwritten, even if I specify a max-height, height, or min-height on the control itself. This is causing odd looking scrolling issues on the dialog. 



2 Replies

PK Paul Kocher December 19, 2018 03:20 PM UTC

I had the same problem with one of the dialogs.

Was able to fix this by adding this to my scss file of the component which holds the ejs-dialog:

ejs-dialog {
max-height: 775px !important;
}

Tried adding max-height via selectors but failed. The above works


PO Prince Oliver Syncfusion Team December 20, 2018 03:23 PM UTC

Hi Joe, 

Thank you for using Syncfusion products. 

During initial rendering, setting max-height style to dialog element is not an issue and this is the default behavior of dialog component. For the below reasons, we have provided the max-height style, by default in dialog component.  
  • The dialog component should be placed with-in that target area. If height is not specified to dialog component, it will get the height based on the target element’s height.
  • If you have specified larger height than the target’s height, the dialog gets the height based on that target element height and it overrides by max-height style property.
  • If suppose, the target element’s height is larger than view port height, the dialog gets the height based on the viewport’s height.
  • You can’t override this max-height, because we have provided this style as inline to dialog element.
 
Could you please share addition information to replicate the odd dialog scrolling issue? this is will help us provide a prompt solution at the earliest. 

Regards, 
Prince 


Loader.
Live Chat Icon For mobile
Up arrow icon