PDA

View Full Version : [FIXED] setValue numeric for textarea



aiky.cc
29 Nov 2012, 6:19 AM
Hi,

when setValues({phones:1010101010}) for textarea {name:'phones'} fireBug says:

value.replace is not a function
Line 78864(ext-all-debug.js 4.1.1a)



78862 stripReturns: function(value){
78863 if (value) {
78864 value = value.replace(this.returnRe, '');
78865 }
78866 return value;
78867 },



Is this a bug?

Test case:


new Ext.form.Panel({
renderTo : document.body,
items : [
{
xtype : 'textareafield',
name : 'phones'
},
{
xtype : 'button',
text : 'setValues',
handler : function(btn) {
var form = btn.up('form').getForm();

form.setValues({
phones : 1010101010
});
}
}
]
});

mitchellsimoens
1 Dec 2012, 7:32 AM
I would expect it to work so I'm going to open a bug for it.

aiky.cc
2 Dec 2012, 2:50 AM
??, sounds good, thank you.

While bug fixing:


Number.prototype.replace = function(){
return this;
};