Results 1 to 2 of 2

Thread: tap event on read only text field

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    245
    Vote Rating
    4
      0  

    Default 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 User
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    925
    Vote Rating
    33
      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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •