Here is a code:
Code:
function resizeIframe(obj)
{
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
var someCfg = {
...
layout:'fit',
width: 800,
border: false,
modal: true,
resizable: false,
html:'<iframe id="someId" src="somePath" frameBorder="0" style="width: 100%; height: 100%;" scrolling="no" onload="javascript:resizeIframe(this);"></iframe>',
...
}
new Ext.Window(someCfg).show();
In ExtJs 3 everything works fine. The correct height of iframe is calculated, the modal window displays correctly.
But in ExtJs 4 and ExtJs 5 versions, the size of the window is always the same = 150px (in Chrome)
How can this be resolved? I can set statically the height property:
Code:
var someCfg = {
...
height: 700;
}
But the content in the source can vary, the height is changed, so it's not a good solution.