Threaded View

  1. #1
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    270
    Answers
    11
    Vote Rating
    1
    davisty is on a distinguished road

      0  

    Default Answered: How to add longpress event to text field?

    Answered: How to add longpress event to text field?


    Hello,

    Im trying to add a longpress event to a text field, but it's not firing.

    What am I doing wrong.

    Code:
     items: [                                        
                        {                                       
                          xtype: 'textfield',                   
                          name : 'SCSCOD',                      
                          id   : 'SCSCOD',                      
                          value:  SCSCOD,                       
                          label: 'Shipper Code',                
                          useClearIcon: true,                   
       listeners: {                                             
                   longpress: function() {                            
                   alert('touched this');                       
                             }                                  
                        }                                       
                        },{

  2. Something like:

    Code:
    new Ext.form.FormPanel({
        fullscreen : true,
        items      : [
            {
                xtype     : 'textfield',
                label     : 'Test',
                listeners : {
                    element : 'el',
                    taphold : function() {
                        console.log('tap');
                    }
                }
            }
        ]
    });

Thread Participants: 1