Если кто-нибудь погуглит здесь, мы пошли дальше и взломали поддержку модальных окон, это было легко, и я не вижу проблем.
// developed and tested against Ext 3.3.3
djg.ContainedModalWindow = Ext.extend(Ext.Window, {
// *djg* new method
sizeMask: function() {
if (this.ownerCt) {
// mind was blown at first, but no-op here works.
// it looks like the dom gets sized just fine automatically
// if there is a container hierarchy with a layout.
// we just have to prevent Ext from overriding it below.
}
else {
// normal Ext 3.3.3 behavior
this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
}
},
// private
beforeShow : function(){
delete this.el.lastXY;
delete this.el.lastLT;
if(this.x === undefined || this.y === undefined){
var xy = this.el.getAlignToXY(this.container, 'c-c');
var pos = this.el.translatePoints(xy[0], xy[1]);
this.x = this.x === undefined? pos.left : this.x;
this.y = this.y === undefined? pos.top : this.y;
}
this.el.setLeftTop(this.x, this.y);
if(this.expandOnShow){
this.expand(false);
}
if(this.modal){
Ext.getBody().addClass('x-body-masked');
this.sizeMask(); // *djg*
this.mask.show();
}
},
// private
onWindowResize : function(){
if(this.maximized){
this.fitContainer();
}
if(this.modal){
// begin *djg*
//this.mask.setSize('100%', '100%');
//var force = this.mask.dom.offsetHeight;
//this.mask.setSize(Ext.lib.Dom.getViewWidth(true), Ext.lib.Dom.getViewHeight(true));
this.sizeMask();
// end *djg*
}
this.doConstrain();
}
});