PDA

View Full Version : validateOnBlur: false does not prevent ComboBox validation on blur



kbsanders
21 Jan 2011, 1:53 PM
Ext version tested:

Ext 3.3.1


css used:

only default ext-all.css


Browser versions tested against:

FF3 (firebug 1.6.1 installed)


Operating System:

Windows 7


Description:

Field validation is occurring when the combo box loses focus, even though validateOnBlur is set to false. The validationEvent property was confirmed to equal the default of 'keyup' and not 'blur'.


Test Case:



var pnl = new Ext.FormPanel(
{
title: 'Combo Validation Test',
renderTo: 'js-target',
padding: 20,
items: [
{
xtype: 'combo',
mode: 'local',
triggerAction: 'all',
valueField: 'value',
displayField: 'display',
fieldLabel: 'Choices',
validateOnBlur: false,
store: new Ext.data.ArrayStore(
{
fields: ['value','display'],
data: [
[1,'Choice 1'],
[2,'Choice 2'],
[3,'Choice 3']
]
}
),
listeners: {
valid: function() {
alert('Valid!');
}
}
}
]
}
);


Steps to reproduce the problem:

After selecting a value in the combo box, click away to blur focus.


The result that was expected:

The field should not be validated and the 'valid' event should not occur.


The result that occurs instead:

The field is validated and the 'valid' event is fired.


Debugging already done:

Firebug Call Stack:

validate()ext-all-debug.js (line 39522)
setValue()ext-all-debug.js (line 39663)
setValue()ext-all-debug.js (line 40018)
setValue()ext-all-debug.js (line 41585)
assertValue()ext-all-debug.js (line 41531)
beforeBlur()ext-all-debug.js (line 41733)
onBlur()ext-all-debug.js (line 39488)
triggerBlur()ext-all-debug.js (line 40304)
mimicBlur(e=Object { browserEvent={...}, button=0, more...})ext-all-debug.js (line 40293)
h(e=Object { browserEvent={...}, button=0, more...})ext-all-debug.js (line 4615)
call()ext-all-debug.js (line 1459)