Sencha touch 扩展Sencha触摸文本字段

Sencha touch 扩展Sencha触摸文本字段,sencha-touch,sencha-touch-2,sencha-touch-2.2,Sencha Touch,Sencha Touch 2,Sencha Touch 2.2,我正在尝试扩展TextField以根据位置信息初始化值。下面的代码满足我的需要 Ext.define("Tasks.view.LatitudeField", { extend: 'Ext.field.Text', alias:'widget.latitudeField', xtype: 'latitudefield', initialize : function() { console.log("Component Initial

我正在尝试扩展TextField以根据位置信息初始化值。下面的代码满足我的需要

Ext.define("Tasks.view.LatitudeField", {
    extend: 'Ext.field.Text',
    alias:'widget.latitudeField',

    xtype: 'latitudefield',  

    initialize : function() 
    {
        console.log("Component Initialized ");
        this.setValue("123456");
    },
});
但是当显示该字段时,我无法单击x图标来清除文本。x图标根本不可单击


在初始化方法中调用父方法:

initialize: function() {
    console.log("Component Initialized ");
    this.setValue("123456");

    this.callParent(arguments);
}