PDA

View Full Version : [1.0.1a/1.1b1] Element.mask returns the mask Element, not the mask's msg Element



mystix
25 Jun 2007, 8:43 PM
Class Ext.Element

According to the docs,
* mask :=> Returns: Element. The message element


however, in the 1.0.1a source for example:
mask : function(msg, msgCls){
if(this.getStyle("position") == "static"){
this.setStyle("position", "relative");
}
if(!this._mask){
this._mask = Ext.DomHelper.append(this.dom, {tag:"div", cls:"ext-el-mask"}, true);
}
this.addClass("x-masked");
this._mask.setDisplayed(true);
if(typeof msg == 'string'){
if(!this._maskMsg){
this._maskMsg = Ext.DomHelper.append(this.dom, {tag:"div", 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);
return this._maskMsg; // perhaps this line should be added?
}
return this._mask; // returns the mask element, not the mask message element
},

tryanDLS
26 Jun 2007, 11:40 AM
Please report documentation issues on the appropriate sticky thread. This is fixed in SVN.

mystix
26 Jun 2007, 4:56 PM
my apologies. i looked at the source and thought the documentation was right this time, and that the source should be returning the mask msg's Element if there was one.