这是我的代码。
当我们在 android 设备中滚动在 sencha+phonegap 中创建的表单面板时,可聚焦的文本框是自移动的
请提出解决方案谢谢
Ext.define('mobileapp.view.Demographics', { extend: 'Ext.form.Panel', xtype: 'Demographics', 需要: ['Ext.field.Number', 'Ext.field.Email',
],
config: {
items:[
{
xtype: 'textfield',
name : 'firstname',
label: 'First Name',
maxLength : 50,
required: true,
labelWrap :true,
placeHolder: 'First Name (required)'
},
{
xtype: 'textfield',
name : 'lastname',
label: 'Last Name',
maxLength : 50,
required: true,
labelWrap :true,
placeHolder: 'Last Name (required)'
},
{
xtype: 'numberfield',
name : 'age',
label: 'Age',
labelWrap :true,
maxLength : 3,
placeHolder: 'Age (In Years)',
listeners: [
{
event: 'blur',
fn: function(a) {
if(a.getValue()!=null)
{
var TodayDate= new Date;
var CurrentYear= TodayDate.getFullYear();
var date=new Date;
date.setDate(01);
date.setMonth(0);
date.setFullYear(CurrentYear-(parseInt(a.getValue())));
Ext.getCmp('DatePickerField').setValue(date);
}
}
}
]
},
},
});