Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1353] Setting cancelBubble TRUE doesn't work in TableView

GitHub Issuen/a
Resolution Date2014-08-03T15:27:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsbubbleparent, tableview
ReporterFokke Zandbergen
AssigneeShuo Liang


As the following example shows you will still get 2 alerts if you click on the button, even though the button sets cancelBubble = true, which should prevent the event from bubbling to the row and table.
var win = Ti.UI.createWindow({
  backgroundColor: 'white'

var row = Ti.UI.createTableViewRow();
var btn = Ti.UI.createButton({title:'click me'});

btn.addEventListener('click', function(e) {
  e.cancelBubble = true;
  alert('hi from row');


var table = Ti.UI.createTableView({
  top: 20,
  data: [row]

table.addEventListener('click', function(e) {
  alert('hi from table');



  1. Shuo Liang 2014-08-01

    Hi, You'd better change line 9 to
       btn.bubbleParent = false;
    as the e stands for the event for callback function, not the component. Regards, Shuo
  2. Fokke Zandbergen 2014-08-01

    Corrected that, sorry ;)
  3. Shuo Liang 2014-08-01

    Tried your new test case, It works well on iOS simulator 7 for both SDK 3.3.0 and 3.2.3. Clicking button only trigger one alert. What kind of device did you use to reproduce this problem.
  4. Fokke Zandbergen 2014-08-02

    I'm limited in what I can do here from the beach in France ;) I think it is safe to assume I made the same error in the test case as I did in the ticket and the ticket can be closed.

JSON Source