1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    244
    Vote Rating
    3
    SuperRoo is on a distinguished road

      0  

    Default tap event on read only text field

    tap event on read only text field


    Hi,
    I'm using Architect 2.2 & need a tap event on a read only text field. I tried adding a basic event to the field and added my own "tap" event (as the field does not have one) with no success.

    Any ideas?

  2. #2
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    758
    Vote Rating
    30
    jminnick will become famous soon enough jminnick will become famous soon enough

      0  

    Default


    If you really want a tap even on a textfield you will have to create it using the textfields element like so:

    Code:
    initialize: function() {
        var me = this;
    
        me.element.on('tap', 'doTap', me);
    
        me.callParent();
    }
    as for the doTap handler:

    Code:
    doTap: function(textfield) {
        this.fireEvent('tap', this, textfield);
    }
    Where you ultimately listen for your custom tap event is up to you. you can use the bubbleEvents property to allow a parent component or something to listen.
    Jason Minnick
    Sencha Architect Development Team

Thread Participants: 1