2016-11-22 11 views
0

最近、ボタンメニューにあるコンボボックスを入力しているときにフォーカスの問題を処理しています。それに焦点を当てて、もうタイプすることはできません。 これはコンボボックス自体から来ていません。なぜなら、ウィンドウ上にコンボボックスを作成すると、コンボボックスがうまく動作するからです。 私はExt js 4.1.3を使用していますが、そのようなコンポーネントを作成するための回避策または代替方法があるかどうかは疑問です。 いくつかのコード:Ext JS Comboboxのボタンメニュー内でフォーカスが維持されない

Ext.define('xxxxx.SaveOptionsButton', { 
    extend: 'Ext.button.Button' 
    ,alias : 'widget.saveOptionsButton' 
    ,constructor : function(config) { 
     var me = this; 
     me.menu = Ext.create('Ext.menu.Menu', 
      { 
       showSeparator:false 
       ,frame:true 
       ,items: [ 
        { 
         xtype: 'checkboxgroup' 
         ,items: [ 
          { 
           xtype:'checkbox' 
           ,name:'save' 
           ,checked: true 
          } 
          , 
          { 
           xtype:'combo' 
           ,name: 'myComboName' 
           ,queryMode:'local' 
          } 
         ] 
       }] 
     }); 
    } 
} 

ありがとう!

答えて

1

は、それが追加解決:

,listeners: { 
    mouseover : function (menu, item, e, eOpts) { 
    //fix bug of loosing focus on combo 


    menu.down("combo[name=shipmentTemplates2]").focus(); 
     } 
} 
関連する問題