Dialog isn't opened!

I get error when i use dialog. I have portlet in my page and there is a grid. I implemented a custom button top of grid for opening a dialog to save something. In addition my app use metronic html theme. When i click open dialog following error is occurs. But button and dialog works in another empty page. What is problem ?

ncaught TypeError: Cannot read property 'offsetHeight' of null
    at t.setMaxHeight (ej2.min.js:1)
    at t.initialize (ej2.min.js:1)
    at t.render (ej2.min.js:1)
    at t.appendTo (ej2.min.js:1)
    at Package:1525

Uncaught TypeError: Cannot read property 'show' of undefined
    at e. (ej2.min.js:1)
    at e.notify (ej2.min.js:1)
    at t.e.trigger (ej2.min.js:1)
    at t.show (ej2.min.js:1)
    at HTMLButtonElement. (Package:1405)


1 Reply

IS Indrajith Srinivasan Syncfusion Team February 18, 2020 08:12 AM UTC

Hi Tumer, 
 
Greetings from Syncfusion support, 
 
We have validated your reported query and updated the details below. The reported issue seems not related to the usage of Medtronic HTML theme. 
 
Error Log 1: When the Dialog’s target has an invalid element (the element is not available in DOM), the reported console error “Console error cannot read offsetHeight of null” will be raised. So, pass valid HTML elements to the target of Dialog.
Error Log 2: When the dialog is not ready (or rendered) in a page on the calling show method, the issue "Cannot read property 'show' of undefined" will be raised. This issue will be resolved by setting a valid target to the dialog.
 
 
We have also prepared a sample based on your requirements. 
 
Can you please try out the above solution and let us know if you face any difficulties. 
 
Regards,
Indrajith
 


Loader.
Up arrow icon