{ "id": "108874", "key": "TIMOB-12493", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15273", "description": "2013 Sprint 05 API", "name": "2013 Sprint 05 API", "archived": true, "released": true, "releaseDate": "2013-03-11" }, { "id": "14815", "description": "2013 Sprint 05", "name": "2013 Sprint 05", "archived": true, "released": true, "releaseDate": "2013-03-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-03-06T22:56:15.000+0000", "created": "2013-01-30T18:09:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "qe-port", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "25336", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "108444", "key": "ALOY-484", "fields": { "summary": "todo app throw exception when deleting last row in table on android", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-06-19T12:43:16.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. problem\r\n\r\nWhen attempting to delete a row in a table by clicking on a UI element in that row, Titanium generates a runtime error on Android (attached).\r\n\r\nWhat appears to be happening is that the event (click) triggered on the UI element within the row is attempting to bubble to the row itself, which no longer exists if the action is to delete the row. This makes a lot more sense in the test case. This may be preventable by messing with the event bubbling properties, but still presents a regression from previous versions.\r\n\r\nThis error does not occur on iOS with this test case.\r\n\r\nh2. test case \r\n\r\nThis problem surfaced in an Alloy app when I updated to TiSDK 3.0.0.GA, but I have created a pure Titanium test case to make things easier. Click the \"delete\" button and you should get the runtime error.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff',\r\n\tfullscreen: false,\r\n\texitOnClose: true\r\n});\r\n\r\nvar table = Ti.UI.createTableView();\r\nvar row = Ti.UI.createTableViewRow({\r\n\theight: '50dp',\r\n});\r\nvar button = Ti.UI.createButton({\r\n\ttitle: 'delete'\r\n});\r\nbutton.addEventListener('click', function(e) {\r\n\ttable.setData([]);\r\n});\r\nrow.add(button);\r\n\r\ntable.setData([row]);\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "35194", "filename": "Screen Shot 2013-01-30 at 1.05.48 PM.png", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-30T18:09:53.000+0000", "size": 42203, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Event bubbling runtime error when deleting rows from a table", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.0.0.GA\r\nAndroid 2.2 emulator", "comment": { "comments": [ { "id": "238018", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A workaround would be to do this in the event handler\n\n{code}\ne.cancelBubble = true;\n{code}", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-11T18:59:51.000+0000", "updated": "2013-02-11T18:59:51.000+0000" }, { "id": "238737", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/3868", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-15T20:06:47.000+0000", "updated": "2013-02-15T20:06:47.000+0000" }, { "id": "241736", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Environment used for verification -\r\nTitanium SDK: 3.1.0.v20130311192922\r\nTitanium  Studio:3.0.2.201302151605\r\nDevice: Samung GALAXY Tab 620 Android 3.2", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-12T11:55:20.000+0000", "updated": "2013-03-12T11:55:20.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }