Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11750

Android: missing row information when clicking on a View inside a TableViewRow

    Details

      Description

      Problem Description

      With SDK 3.0.0, when a TableViewRow has a view inside, and this view is clicked, the listener does not return back the information about the row. In particular, these properties are missing: "detail", "index", "row", "rowData", "searchMode", "section". Clicking in the row itself works fine.

      This was working on 2.1.x

      Steps to reproduce

      Use this code to reproduce the problem:

      var win = Ti.UI.createWindow({
      	backgroundColor : 'white'
      });
       
      var table = Ti.UI.createTableView();
       
      var row = Ti.UI.createTableViewRow({
          width: "100%",
          height: 100
      });
       
      var v = Ti.UI.createView({
         left: 0, top: 0,
         width: '50%', height: 100,
         backgroundColor : 'red'
      });
          
      row.add(v);
      table.setData([row]);
          
      table.addEventListener('click', function(e) {
          alert(e);
      });
       
      win.add(table);
      win.open();
      

      Clicking on the RED window does not show e.index, e.row etc., while clicking on the right part (white), you can see them.

      These are the results of the click on the red view:

      {
        "type":"click",
        "source": {
          "backgroundColor":"red",
          "backgroundRepeat":false,
          "height":100,"left":0,"top":0,
          "rect":{"height":100,"y":0,"x":0,"width":360},
          "width":"50%",
          "size":{"height":100,"y":0,"width":360,"x":0},
          "keepScreenOn":false,
          "children":[],
          "bubbleParent":true
        },
        "bubbles":true,
        "y":60,
        "cancelBubble":false,
        "x":190
      }
      

      ...and clicking on the row (white):

      {
        "type":"click",
        "source":{
          "backgroundRepeat":false,
          "height":100,
          "children":[{
            "backgroundColor":"red",
            "backgroundRepeat":false,
            "height":100,"left":0,"top":0,
            "rect":{"height":100,"y":0,"x":0,"width":360},
            "width":"50%",
            "size":{"height":100,"y":0,"width":360,"x":0},
            "keepScreenOn":false,
            "children":[],
            "bubbleParent":true
          }],
          "rect":{"height":0,"y":0,"x":0,"width":0},
          "width":"100%",
          "size":{"height":0,"y":0,"width":0,"x":0},
          "keepScreenOn":false,
          "bubbleParent":true
        },
        "detail":false,
        "index":0,
        "bubbles":true,
        "rowData":{
          "backgroundRepeat":false,
          "width":"100%","height":100
        },
        "searchMode":false,
        "row":{
          "backgroundRepeat":false,
          "height":100,
          "children":[{
            "backgroundColor":"red",
            "backgroundRepeat":false,
            "height":100,"left":0,"top":0,
            "rect":{"height":100,"y":0,"x":0,"width":360},
            "width":"50%",
            "size":{"height":100,"y":0,"width":360,"x":0},
            "keepScreenOn":false,
            "children":[],
            "bubbleParent":true
          }],
          "rect":{"height":0,"y":0,"x":0,"width":0},
          "width":"100%",
          "size":{"height":0,"y":0,"width":0,"x":0},
          "keepScreenOn":false,
          "bubbleParent":true
        },
        "section":{
          "children":[],
          "rect":{"height":0,"y":0,"x":0,"width":0},
          "size":{"height":0,"y":0,"width":0,"x":0},
          "keepScreenOn":false,
          "rows":[{
            "backgroundRepeat":false,
            "height":100,
            "children":[{
              "backgroundColor":"red",
              "backgroundRepeat":false,
              "height":100,"left":0,"top":0,
              "rect":{"height":100,"y":0,"x":0,"width":360},
              "width":"50%",
              "size":{"height":100,"y":0,"width":360,"x":0},
              "keepScreenOn":false,
              "children":[],
              "bubbleParent":true
            }],
            "rect":{"height":0,"y":0,"x":0,"width":0},
            "width":"100%",
            "size":{"height":0,"y":0,"width":0,"x":0},
            "keepScreenOn":false,
            "bubbleParent":true
          }],
          "rowCount":1,
          "bubbleParent":true
        },
        "cancelBubble":false
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                dcassenti Davide Cassenti
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-14934
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration