2016-12-01 3 views
0

Androidの煎茶用のExtJSにサポートしていませkeyUpイベント、 私がいないアップピンキー上のタブとキーボードの皮、すべてのコントロール、 しかし、iOSの上でこのコードのサポート、イベントフォーカス&Iがサポートしていない理由を知りたい、私は問題のイベントは、Android上& keyUpイベント、 をfocuseいる

希望uはenableKeyEventsがtrueに設定されているのみ火災場合、新しい内線バージョンkeyUpイベントでは、この

focus: function(){ 
            var Athis = this.up('confirmation1'); 
            var txtValue = this.getValue().focus() == null ? 0 : this.getValue().length; 
            Athis.onInputValue(txtValue, this, ''); 
           }, 
           keyup: function(){ 
            var Athis = this.up('confirmation1'); 
            var txtValue = this.getValue() == null ? 0 : this.getValue().length; 


Ext.define('Test.view.Confirmation1',{ 

extend  : 'Ext.Panel' 
,xtype  : 'confirmation1' 

    ,config: { 

    height: '100%', 
    layout: 'vbox', 
    scrollable: true, 
    style: 'background-color: #E8D3B8;', 

    items: [{ 
      { 

        xtype:'container', 
        layout: { type: 'hbox', pack: 'center' }, 
        cls:'textblueNumberNew', 
        flex : 1, 
        items:[{ 

         width: '70%', 
         minLength: 6, 
         maxLength: 6, 
         xtype:'textcodefield', 
         cls: 'txtPassCodeTransparent', 
         itemId: 'txtPinCode', 
         reference: 'txtPinCode', 
         // id: 'pinCode', 
         clearIcon: false, 
         html: [ 
          '<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>', 
          '<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>', 
          '<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>', 
          '<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>', 
          '<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>', 
          '<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>' 
          ].join(''), 
         listeners:{ 

          blur: function(){ 
           var Athis = this.up('confirmation1'); 
           var txtValue = this.getValue() == null ? 0 : this.getValue().length; 
           Athis.onInputValue(txtValue, this, 'Blur'); 
          }, 
          focus: function(){ 
           var Athis = this.up('confirmation1'); 
           var txtValue = this.getValue().focus() == null ? 0 : this.getValue().length; 
           Athis.onInputValue(txtValue, this, ''); 
          }, 
          keyup: function(){ 
           var Athis = this.up('confirmation1'); 
           var txtValue = this.getValue() == null ? 0 : this.getValue().length; 
           Athis.onInputValue(txtValue, this, ''); 
          }, 
          change: function(){ 
           var pinLength = this.getValue().length; 
           if (pinLength >6){ 
            this.setValue(this.getValue().toString().substring(0,6));  
           } 
           var Athis = this.up('confirmation1'); 
           var txtValue = this.getValue() == null ? 0 : this.getValue().length; 
           Athis.onInputValue(txtValue, this, ''); 
          } 
         } 

        }] 


       } 
     }] 
} 
}) 

答えて

1

を解決することができます。あなたのテキストフィールドにenableKeyEvents : trueのキーアップイベントが追加されます。また、enableKeyEventsとフォーカスがどのように動作しているかを確認できるDocを確認してください。

これは、このコンポーネントがフォーカスを受け取ったときに発生します。

+0

はい、私は解決してもまだ動作しないコードを試してみてください – sreyroth

+0

'xtype: 'textcodefield'の下に' enableKeyEvents:true'を貼り付け、他のxtypeを置くと ' – UDID

+0

は動作しませんでしたか? – sreyroth

関連する問題