Threaded View

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    13
    Vote Rating
    0
    JackThor is on a distinguished road

      0  

    Default Answered: Tap event on textField

    Answered: Tap event on textField


    Hi so I have a text field component inside my container. I made it so that it is read only, and would like to add a tap event to it. I understand that the text fields does not have a tap event so I looked around and found a possible solution. It works for the most part except that it makes the whole container listen to the tap event, the fireEvent is not working correctly, and I am not sure how fire the event for the specific element tapped. Here is my code. Any help would be great thanks.

    Code:
    Ext.define('GS.view.newEventsView',{
            extend:'Ext.Container',
            xtype:'newEventsView',
            initialize:function(){
                var me = this;
        	me.element.on('tap', 'doBubbleTap', me);
            me.callParent();    
        },
        doBubbleTap : function(e, t) {    
        	this.fireEvent('play', this, e , t);
        },
         tap: function(caller, event, target){
        		console.log(event);
        		console.log(target);
        	},
      }
      // my tool bar goes here and some other items like my field set with my textfield

  2. Looks like your listening directly on the container for the tap event. You should probably just get your textfield and set the listener directly on its element.

    Something like this...

    Code:
       initialize:function(){
            var textField = this.down('textfield');
            textField.element.on({
                tap : function(e){
                    console.log('tapped text field');
                }
            });
        }

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