Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Default [PR3] Blur event not triggered on Enter/Return key

    [PR3] Blur event not triggered on Enter/Return key


    If you use the "tab" key to leave the "First Name" field, the BLUR event is correctly triggered but not if you use the "enter/return" key!

    Code:
    Ext.application({
        name: '2.0 PR3 Form Test',
    
    
        launch: function() {
            console.log('launch:');
    
    
            var myPanel = Ext.create("Ext.Panel", {
                fullscreen: true,
                layout: 'fit',
                items: [
                {
                    title: 'Basic',
                    xtype: 'formpanel',
                    id: 'basicform',
                    items: [
                    {
                        xtype: 'textfield',
    					id: 'firstName',
                        name: 'first',
                        label: 'First'
                    },
                    {
                        xtype: 'textfield',
    					id: 'lastName',
                        name: 'last',
                        label: 'Last'
                    }
                    ]
                }
                ]
            });
            console.log('myPanel=' + myPanel);
            var firstName = myPanel.down('#firstName');
    		console.log('firstName=' + firstName);
            firstName.on({
                blur: function() {
                    console.log('BLUR event: firstName.getValue()= ' + firstName.getValue());
                }
            });
    
    
        }
    });

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Vote Rating
    0
    robl is on a distinguished road

      0  

    Lightbulb


    I believe I found and have a fix for this bug in PR3:

    Code:
        doKeyUp: function(me, e) {
            var value = me.getValue();
            me[value ? 'showClearIcon' : 'hideClearIcon']();
    
            if (e.browserEvent.keyCode === 13) {
                me.getComponent().blur();  // MY FIX                                                                                                                                             
                me.fireAction('action', [me, e], 'doAction');
            }
        },

  3. #3
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Thanks for the report.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Why would the blur event fire when you press enter/return? Enter/return normally does nothing in mobile devices, it just stays in the same field - so the field shouldn't blur.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    If you want to listen to the enter/return key, listen to the `action` event - then blur the field if you want.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi