PDA

View Full Version : Focus event on spinner click



victory4390
15 Oct 2013, 11:13 PM
I'm using a numberfield xtype as one item in my form. I would like to make this numberfield blur after entering some value in that field. When mouse is clicked in that field and after clicking any where outside of that field the blur event is getting called. But when we enter some value using spinner in that numberfield, and then clicking outside of that numberfield, blur event is not getting fired. Please help.....

Zinnia
17 Oct 2013, 5:24 AM
Hi,

Have check the below issue , it is workin fine.
On entering a value using spinner , if we click out side , the blur event is fired

Check the below code at your end

Ext.create('Ext.form.Panel', {
title: 'On The Wall',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'numberfield',
anchor: '100%',
name: 'bottles',
fieldLabel: 'Bottles of Beer',
value: 99,
maxValue: 99,
minValue: 0,
listeners: {
blur: function(comp, evtObj){
alert(1);
}
}

}]
});

victory4390
17 Oct 2013, 5:48 AM
that is not working. After giving the value thru the spinner and clicking anywhere outside, blur event is not firing.
I tested it.