PDA

View Full Version : doesn't call onBlur before submit when I use keys options in FormPanel



aimer311
24 Apr 2011, 7:08 PM
I defined a formPanel like this:


this.mainForm = new Ext.FormPanel({
keys:[{
key: [13], //enter
scope : this,
fn:this.queryHandler
}],
layout : 'form',
border : false,
frame : false,
autoScroll :true,
items : []
});

the FormPanel is in an Ext Window with two buttons.
when I click the query button or handle enter key,It will call queryHandler. there is no problem.
but there is a TriggerFiled in this FormPanel,and it will set value when it call onBlur func.
now the problem comes,when I click the query button,it will call onBlur func for every fields,then call queryHandler func.that is the right way.
but when I handle enter key.it will call the queryHandler first,then trigger the onBlur .so the value in the TriggerField is old. I don't know why this happen.thanks for any suggestion.