Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10751] Android: TableViewRow doesn't fire click event

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-09-09T19:30:49.000+0000
Affected Version/sRelease 2.1.2, Release 3.0.0
Fix Version/sn/a
ComponentsAndroid
LabelsSupportTeam, api, parity
ReporterEduardo Gomez
AssigneeNeeraj Gupta
Created2012-09-04T14:10:53.000+0000
Updated2017-03-22T20:38:51.000+0000

Description

Parity Problem

When you add the button directly to the row, the event doesn't fire when you click on the left side of the row (actual behavior).

Expected behavior

The click event fired when clicking on a row

Tested on

iOS 5.1 simulator Droid Razr 2.3.5

Repro sequence


var win = Ti.UI.createWindow({
    backgroundColor : '#00ffff'
});

var tableView = Titanium.UI.createTableView({
	allowsSelection: true
}); 

var row = Ti.UI.createTableViewRow({
    height: 60,
    className: 'row'
});

var btnSw = Titanium.UI.createButton({        
    right:0,
    height: 50,
    width: 50,          
    title: 'foo',
    sw:true    
});

btnSw.addEventListener('click', function(e) {
    alert('Button');
})

row.add (btnSw);//if you remove the button the row will be able to get the click event

tableView.addEventListener('click', function(e) {
   alert('got click');
});

tableView.setData ([row]);

win.add (tableView);

win.open ();

Comments

  1. Ivan Skugor 2012-09-04

  2. Neeraj Gupta 2012-09-05

    Thanks, Ivan. This is indeed a duplicate of TIMOB-9867.
  3. Eduardo Gomez 2012-09-05

  4. Eduardo Gomez 2012-09-05

    That was on accident when addressing the customer issue, just to keep track.
  5. Lee Morris 2017-03-22

    Closing ticket as duplicate of the ticket that is mentioned above and has since been closed.

JSON Source