{ "id": "112934", "key": "TIMOB-13605", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-04-16T13:26:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "parity", "reprod" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:35.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "i have a label in a TableViewRow with selectedBackgroundColor set. what i am trying to do is to avoid the change of the TableViewRow background color when i click on the label inside it. the code below always changes the background color even if i cancelBubble on the label click event. it works on Android but not on iOS. \r\n\r\nTo work on iOS, set tableRowView touchEnabled to true\r\nTo work on Android, set tableRowView touchEnabled to false.\r\n\r\n*Test case*\r\n{code}\r\nvar mainWindow = Ti.UI.createWindow({\r\n title : 'Lab',\r\n backgroundColor : 'white',\r\n fullscreen : false,\r\n navBarHidden : true,\r\n exitOnClose : true,\r\n orientationModes : [Titanium.UI.PORTRAIT]\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n width : Ti.UI.FILL,\r\n height : Ti.UI.FILL\r\n});\r\n\r\nvar tbl = Ti.UI.createTableView({\r\n width : Ti.UI.FILL,\r\n separatorColor : '#eeeeee',\r\n backgroundColor : 'white',\r\n top : 20,\r\n bottom : 10,\r\n left : 10,\r\n right : 10,\r\n showVerticalScrollIndicator : false,\r\n borderColor : 'white',\r\n borderRadius : 4,\r\n borderWidth : 1\r\n\r\n});\r\n\r\nvar tableRow = Ti.UI.createTableViewRow({\r\n className : 'outletRow',\r\n touchEnabled : true,\r\n height : Ti.UI.SIZE,\r\n width : Ti.UI.FILL,\r\n hasChild : true,\r\n selectedBackgroundColor : '#c6c6c6',\r\n parentRow : null\r\n});\r\n\r\nvar tableRowView = Ti.UI.createView({\r\n width : Ti.UI.FILL,\r\n touchEnabled : false,//set true for iOS - false of Android to bubble event to TableViewRow\r\n height : Ti.UI.SIZE,\r\n top : 0,\r\n left : 5,\r\n right : 5,\r\n layout : 'vertical',\r\n});\r\n\r\nvar lbl = Ti.UI.createLabel({\r\n color : '#3b5998',\r\n linkLabel : true,\r\n text : \"value 1\",\r\n left : 0,\r\n touchEnabled : true,\r\n borderRadius : 4,\r\n width : Ti.UI.SIZE,\r\n wordWrap : true,\r\n horizontalWrap : false,\r\n font : {\r\n fontSize : 20\r\n }\r\n});\r\nlbl.addEventListener('click', function(e) {\r\n e.cancelBubble = true;\r\n alert('click')\r\n});\r\n\r\ntableRowView.add(lbl);\r\ntableRow.add(tableRowView);\r\ntbl.setData([tableRow]);\r\n\r\nview.add(tbl);\r\n\r\nmainWindow.add(view);\r\nmainWindow.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: Can't cancel TableViewRow selectedBackgroundColor on label click", "creator": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "subtasks": [], "reporter": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "environment": "Application type: mobile Titanium SDK: 3.0.2.GA, Platform & version: iOS 4.3.5, Device: iPode touch,", "comment": { "comments": [ { "id": "247975", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 3.1 GA on iOS 6 simulator and Android 4.1.2 emulator - confirmed parity. However, the touchEnabled property doesn't make a difference in either case. Basically, the touch event bubbles on iOS, and doesn't bubble on Android.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-17T19:05:52.000+0000", "updated": "2013-04-17T19:05:52.000+0000" }, { "id": "420402", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I have been able to reproduce this issue with the following environment; \r\niPhone 7 (10.2) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.9.0.201705021158 \r\nTi SDK 6.1.0.v20170519131839 \r\nAppc NPM 4.2.9 \r\nAppc CLI 6.2.1 \r\nTi CLI 5.0.13 \r\nAlloy 1.9.11 \r\nArrow 2.0.0 \r\nXcode 8.2 (8C38) \r\nNode v4.8.2 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-24T22:57:49.000+0000", "updated": "2017-05-24T22:57:49.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }