PDA

View Full Version : Ext.Window + IE rendering problem



chinabuffet
11 May 2010, 4:08 AM
I'm trying to use an Ext.Window to wrap around a custom component I created. In firefox, the window assumes the width/height of the child component I've added into it and renders fine... In IE, however, the window renders HUGEEEE, like 6000+ pixels wide for some reason. Is there something I am missing... like some kind of config option to have the Ext.Window assume the width/height of its children? If I try to set a width/height on the Ext.Window directly, that width is then trying to include the space taken up by the borders and stuff on the Window, resulting in some of the child components content being cut out...

Here is a small sample... any help is appreciated!



Ext.onReady(function() {
new Ext.Window({
items: {
xtype: "container",
width: 300,
height: 200
}
}).show();
});

chinabuffet
11 May 2010, 12:09 PM
Anyone have a suggestion?

chinabuffet
12 May 2010, 5:17 PM
Anyyyonneeeee? :(

puow
24 May 2010, 1:52 AM
I have the same issue I don't suppose you found a solution?

mankz
24 May 2010, 4:21 AM
Windows need height and width to work. Try something like this:


Ext.onReady(function() {
new Ext.Window({
layout : 'fit',
width: 300,
height: 200
items: [{
xtype: "container"
}]
}).show();
});

Wedgie
23 Aug 2010, 5:57 PM
Sorry to reopen a slightly stale thread, but this is the latest one that addresses this issue of Ext.Window sizing in IE that I could find in the forum.

Currently on Ext 3.2.1 but this issue has been around for a long time.

I find that leaving window height as 'auto' works fine 99% of the time but some of my customers report that the resulting height is sometimes too short, thus clipping the contained form. Typically this is reported for users on IE8, and I have observed it on the customer's system using screen sharing, though I have not been able to reproduce this myself in any browser including IE6 thru IE8.

Mankz when you say "Windows need height and width to work" is this really so? If it is I think a big warning in the docs is warranted since the problem arising from not following this rule only occurs in rare circumstances and only becomes apparent when the occasional customer reports the error. Being hard to reproduce means that many hours can be wasted trying to figure out what is going on.

If I really do have to explicitly set the window height can you suggest a method by which I can set the height to match the contained form? The content of the form is dynamic, but even if it wasn't I would still have to allow for CSS differences (over which I have no control) that impact on height. Just leaving a big margin at the bottom is not only ugly, it makes me look inept.

Should I render the form off-screen then get the height before moving it into the correctly sized window perhaps?