Re-centering the DHTMLX modal window


#1

Code:
var dhtmlxWindow = dhtmlxWindows.createWindow(winId, 100, 100, width, height);
dhtmlxWindow.setText(columnName);
dhtmlxWindow.setModal(true);
dhtmlxWindow.denyResize();
dhtmlxWindow.centerOnScreen();

$(window).resize(function() {
    dhtmlxWindow.centerOnScreen();
});

I created a modal window with the code above. When user opens the window at that time it shows up in the center of the screen. However, when user tries to resize the browser we do not recenter the window.

Could you please suggest a way to recenter the modal window?

Thanks in Advance.


#2

Unfortunately the problem cannot be reproduced locally.
Your code works well for me.
Here is the snippet:
http://snippet.dhtmlx.com/d9b72ae86
If the problem still occurs for you please, provide a complete demo or share a demo link, where the problem can be reconstructed locally