Hello, I have problems with IE8 and Opera not reacting to focus event, when clicking on TextArea. Chrome and FF behaves as expected. Here is the code:
Code:
this.txtValue = "Blank textarea...";
this.txtValue2 = "Blank textarea2...";
this.txtCoords = new Ext.form.TextArea({
id: "txtCoords",
value: this.txtValue,
listeners: {
scope: this,
focus: function(){
if(this.txtCoords.getValue() == this.txtValue || this.txtCoords.getValue() == this.txtValue2){
this.txtCoords.setValue("");
Ext.getCmp("txtCoordsId").getEl().dom.style.color = 'black';
};
},
blur: function(){
if(this.txtCoords.getValue() == ""){
if(this.cmbKoordTipas.getValue() == "g1"){
this.txtCoords.setValue(this.txtValue);
Ext.getCmp("txtCoordsId").getEl().dom.style.color = 'grey';
}else{
this.txtCoords.setValue(this.txtValue2);
Ext.getCmp("txtCoordsId").getEl().dom.style.color = 'grey';
}
}
}
},
style: "font-size:11px; color:grey;"
});
I'm making a replacement for emptyText, because I need to dynamically change TextArea's value when it's empty. EmptyText submits to the server ant that is not that I want
I appreciate any help on this issue. Maybe I should be using another event?
p.s. Blur works fine.