Threaded View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    21
    Vote Rating
    1
    Tobias2200 is on a distinguished road

      0  

    Default Answered: TextField(Area) events not working?

    Answered: TextField(Area) events not working?


    I have a form with disabled items (textfields and textareafields) and when I tap on an item it should be enabled (=editable).

    I tried using 'tap' and 'click' in my controller, but they are not firing. However, 'focus' and 'blur' are firing, but the object handed over by the event is a HTMLTextArea and not a Sencha Touch TextAreaField. 'Change' is firing and the object handed over by the event is, as expected, a Sencha Touch TextAreaField.

    What's going on?

    Code:
    this.control({
                '#create-todo-form #description' : {
                    tap: function(a,b,c,d,e,f)
                    {
                        console.log(a);
                        console.log(b);
                        console.log(c);
                        console.log(d);
                        console.log(e);
                        console.log(f);
                    }
                },
            });
    also, the order of the arguments are not as described in the docs.

  2. Erm, you should listen to the field input element tap event.

    Code:
    var input = field.getComponent();
    input.element.on({
        tap: function() {
            console.log('tap!');
        }
    });

Thread Participants: 1