PDA

View Full Version : [2.x][DUP] Element.unmask doesn't remove "relative"



LorenzoW
13 Aug 2008, 2:19 AM
I'm using Firefox 3, Ext 2.2.

Element.mask adds position: relative if the current element is position: static, but Element.unmask doesn't change this back.

I have a FormPanel with position: static, but after a mask/unmask operation it has position: relative and it destroy my layout.

I found other threads about that, but not "clean solutions".

http://extjs.com/forum/showthread.php?p=123110#4

Is this a bug of Ext or I must override mask/unmask?

thank you



mask : function(msg, msgCls){
if(this.getStyle("position") == "static"){
this.setStyle("position", "relative");
}
if(this._maskMsg){
this._maskMsg.remove();
}
if(this._mask){
this._mask.remove();
}

this._mask = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask"}, true);

this.addClass("x-masked");
this._mask.setDisplayed(true);
if(typeof msg == 'string'){
this._maskMsg = Ext.DomHelper.append(this.dom, {cls:"ext-el-mask-msg", cn:{tag:'div'}}, true);
var mm = this._maskMsg;
mm.dom.className = msgCls ? "ext-el-mask-msg " + msgCls : "ext-el-mask-msg";
mm.dom.firstChild.innerHTML = msg;
mm.setDisplayed(true);
mm.center(this);
}
if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && this.getStyle('height') == 'auto'){ this._mask.setSize(this.dom.clientWidth, this.getHeight());
}
return this._mask;
},


unmask : function(){
if(this._mask){
if(this._maskMsg){
this._maskMsg.remove();
delete this._maskMsg;
}
this._mask.remove();
delete this._mask;
}
this.removeClass("x-masked");
},

Condor
13 Aug 2008, 2:54 AM
Why are you opening a new bugreport if the previous report (http://extjs.com/forum/showthread.php?p=123110#4) already covers the problem?

You only need to 'bump' the other bugreport (and mentioning that the bug still applies to the newest version is also appreciated).