sreyroth
sreyroth

Reputation: 13

Event focus & keyup not support on Android sencha extjs

I have matter on Event focuse & Keyup on Android , I want to know why not support , When I tab on Pin Key not up and Key board hide all control , But this code support on iOS,

Hope u can solve this

 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, '');
                            }
                        }

                    }]


                }
       }]
 }
})

Upvotes: 0

Views: 95

Answers (1)

UDID
UDID

Reputation: 2423

In new ext version keyup event only fires if enableKeyEvents is set to true. In your textfield add enableKeyEvents : true keyup event will start work. Also please check Doc where you can verify enableKeyEvents and How the focus is working.

It Fires when this Component receives focus.

Upvotes: 1

Related Questions