Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-5553

Android: TextField do not fire touch events

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Environment:

      Description

      TextField View on Android does not fire "click", "singletap", "doubletap", ...
      Events are not fired even with editable = false
      If TextField is set with touchEnable = false, events do not pass to the parent, no events are fired

      Example code:

       
      var cnt = $.UI.create("View", {
      	backgroundColor: "#FF0000",
      	height:Ti.UI.SIZE,
      	top: 100
      });
       
      var tf = $.UI.create('TextField', {
      	height: 40,
      	backgroundColor: "#FFFFFF",
      	borderWidth: 1, borderColor: "#000000",
      	left: 40,
      	right: 40,
      	top: 40,
      	bottom: 40,
      	editable: false,
      	touchEnabled: false
      });
       
      // Event on the parent element that emit the click event if directly touched
      cnt.addEventListener("click", function()
      {
      	alert('Click CNT OK');
      });
       
      tf.addEventListener("click", function()
      {
      	alert('Click TF OK');
      });
       
      tf.addEventListener("singletap", function()
      {
      	alert('SingleTap TF OK');
      });
       
      tf.addEventListener("doubletap", function()
      {
      	alert('DoubleTap TF OK');
      });
       
      tf.addEventListener("longpress", function()
      {
      	alert('LongPress TF OK');
      });
       
       
      cnt.add(tf);
      $.win.add(cnt);
       
       
      $.win.open();
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shossain Shak Hossain
                Reporter:
                sandrolain Sandro Lain
              • Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code