我似乎無法能夠集中字段的形式ExtJS的4extjs4 - 如何關注文本字段?
的文檔列出了文本字段(繼承自Component)聚焦功能,但它不能在對焦方面做任何事到輸入字段。
下面是從文檔
Ext.create('Ext.form.Panel', {
title: 'Contact Info',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [{
xtype: 'textfield',
name: 'name',
fieldLabel: 'Name',
allowBlank: false
}, {
xtype: 'textfield',
id:'email',
name: 'email',
fieldLabel: 'Email Address',
vtype: 'email'
}]
});
一個示例代碼。如果我叫什麼Ext.getCmp('email').focus()
可見發生。
在extjs 4中關注字段的正確方法是什麼?
在FF 6.0.2 mac上可能出現[Set on focus on Extjs textfield](https://stackoverflow.com/questions/6591371/set-focus-on-extjs-textfield) – Vadzim