PDA

View Full Version : [CLOSED][3.0.0] HtmlEditor in a panel with anchor layout problem [IE7]



mono blaine
20 Jul 2009, 3:59 AM
...
width: 600,
height: 520,
items: new Ext.Panel({
title: 'hede',
layout: 'anchor',
items: new Ext.form.HtmlEditor({
enableSourceEdit: false,
anchor: '100% -60'
})
})
...


In IE7, I get an "Object doesn't support this property or method" error. Is it a bug or a bad practice to put an HtmlEditor inside a panel with anchor layout?

Condor
20 Jul 2009, 4:01 AM
What size does the panel have? Does the panel container have a layout that manages the panel size?

mono blaine
20 Jul 2009, 4:02 AM
The outer panel is a Window having accordion layout.

Condor
20 Jul 2009, 4:05 AM
Is it an accordion layout with layoutConfig:{fit: true}?

If it isn't, your panel is going to need a fixed height.

Also, the accordion layout is autoWidth:true, so fitting layouts inside don't respond very well to width changes (but that's a different bug).

evant
20 Jul 2009, 4:05 AM
Please post a full test case, code snippets leave it open for interpretation.

mono blaine
20 Jul 2009, 4:10 AM
Here's the full code:



var managementWindow = new Ext.Window({
bodyStyle: 'padding: 4px;',
iconCls: 'managementIco',
border: false,
title: 'hede',
plain: true,
maximizable: false,
resizable: false,
autoScroll: true,
closable: true,
modal: true,
layout: 'accordion',
layoutConfig: {
animate: true
},
width: 600,
height: 520,
items: new Ext.Panel({
title: 'hodo',
layout: 'anchor',
items: new Ext.form.HtmlEditor({
enableSourceEdit: false,
anchor: '100% -60'
})
})
});
managementWindow.show();

evant
20 Jul 2009, 4:18 AM
Just ran your example in IE7 with no problem.

Condor
20 Jul 2009, 4:18 AM
I don't get an error using your testcase.

Tried IE6+7+8 quirks+standards mode.

mono blaine
20 Jul 2009, 4:32 AM
Oh, damn it. I'm so sorry guys, I haven't actually posted the whole code. I never thought that would be the reason of the error :">

The problem is the way I try to mask the HtmlEditor. I think attempted to mask the window object (:|



new Ext.form.HtmlEditor({
enableSourceEdit: false,
anchor: '100% -60',
listeners: {
scope: this,
render: function (c) {
this.el.mask();
...
}
}
})

Condor
20 Jul 2009, 4:43 AM
Correct. You should have used:

listeners: {
render: function (c) {
c.getEl().mask();
...
}
}