disabled selectfield acts as if enabled when navigated to using tab
// bug / feature deficiency
// disabled selectfield acts as if enabled when navigated to using tab key in chrome Version 23.0.1271.97 m
// 'Ext.field.Select' file: Select.js
onMaskTap: function() {
//-----------------------------------------
//if (this.getDisabled()) { move this to onFocus(e)
// return false;
//}
//----------------------------------------------------
this.onFocus();
return false;
}
onFocus: function (e) {
//- will handle tab navigation focus when selectfield is disabled
if(this.getDisabled())
{
return false;
}
//--------- continue with original code
var component =this.getComponent();
this.fireEvent('focus',this, e);
if(Ext.os.is.Android4){
component.input.dom.focus();
}
component.input.dom.blur();
this.isFocused =true;
this.showPicker();
}
Test case:
Code:
Ext.Viewport.add({
xtype : 'formpanel',
items : [
{
xtype : 'textfield',
label : 'Foo'
},
{
xtype : 'selectfield',
label : 'Choose one',
disabled : true,
options : [
{ text : 'First Option', value : 'first' },
{ text : 'Second Option', value : 'second' },
{ text : 'Third Option', value : 'third' }
]
}
]
});