I am using Popup_Editor of RichWidgets and inside of popup I use the ExpandCollapse widget, when I expand one div the popup also increases the size but when I collapse the div the size of popup stays the same. Should not decrease the size?

any solution?

I Pedro,

There's an autoresize but only to increase.
You need to run the script yourself, the solution has to steps:
1 - Notify the parent;
2- In the notify action you need to run something like this "osjs('iframe').height(650);osjs('.ui-dialog').height(650);osjs('iframe').width(650);osjs('.ui-dialog').width(650);osjs('.ui-dialog').css('top','100px');osjs('.ui-dialog').css('left','300px');"

This will resize the iframe and the main div of the popup, to the values indicated.

Hope that helps
Hi Nuno,
The OS should change the name of AutoResize to AutoIncrease.
Thanks for the help, your solution worked for me but I made a few adjustments, I leave here my solution:

var height1 = $(""iframe"").contents().find('#"+MainDivPopUpId_By_NotifyWidget+"').height();
var width1= $(""iframe"").contents().find('#"+MainDivPopUpId_By_NotifyWidget+"').width();
var left1 = (screen.width/2)-(width1/2);
var top1 = (screen.height/2)-(height1/2);

osjs('.ui-dialog').css('top', top1 + 'px');
osjs('.ui-dialog').css('left', left1 + 'px');

Hey guys.

For 8.0 I believe you can use something like
osjs('.os-internal-ui-dialog-content iframe:first').height(1);

For previous versions, I didn't test but it should be something like
osjs('.ui-dialog-content iframe:first').height(1);