{ "id": "166154", "key": "TIMOB-24430", "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": "2017-02-20T10:03:26.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:54:52.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": [], "description": "The Green View has click event and a child (Blue View).\r\nThe Blue View does not bubble click event to the Green View.\r\nIf it has the 'postlayout' event, it becomes clickable again\r\n\r\n{code:title=widget.js|borderStyle=solid}\r\ninit();\r\nfunction init() {\r\n var viewBlue = Ti.UI.createView({ width: 200, height: 300, backgroundColor: 'blue' });\r\n\r\n // // without this, viewBlue is not click-able\r\n // viewBlue.addEventListener('postlayout', viewBlueReady);\r\n\r\n $.containerGreen.add(viewBlue);\r\n}\r\n{code}\r\n\r\nEnvironment:\r\n- OSX 10.12.3\r\n- Xcode 8.2.1\r\n- Titanium SDK 6.0.1.GA\r\n- iOS simulator 10.2", "attachment": [ { "id": "61641", "filename": "Screen Shot 2017-02-20 at 4.53.34 PM.png", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2017-02-20T10:00:27.000+0000", "size": 20346, "mimeType": "image/png" }, { "id": "61642", "filename": "test_widget.zip", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2017-02-20T09:59:04.000+0000", "size": 10475756, "mimeType": "application/zip" } ], "flagged": false, "summary": "Views are not clickable", "creator": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "subtasks": [], "reporter": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "environment": null, "comment": { "comments": [ { "id": "407432", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Can you explain a little more what the issue really here? I see you have not define any EventListener for blue view. And you are removing removeEventListener which you haven't define. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-20T16:13:35.000+0000", "updated": "2017-02-20T16:13:58.000+0000" }, { "id": "407459", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "body": "I added click event (greenClick) for the Green View.\r\n\r\n{code:title=widget.xml|borderStyle=solid}\r\n\r\n{code}\r\n\r\nGreen View is parent of the Blue View.\r\nSo when i clicked on the Blue View, the greenClick should be fired.\r\nBut actually, greenClick is not fired.\r\n\r\nIf we uncomment the following line\r\n\r\n{code:title=widget.js|borderStyle=solid}\r\n// viewBlue.addEventListener('postlayout', viewBlueReady);\r\n{code}\r\n\r\nand click on the Blue View\r\nthe greenClick event is now fired.\r\nThe removeEventListener call is now required to prevent repeat calls\r\n\r\n:)\r\n", "updateAuthor": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2017-02-21T02:22:28.000+0000", "updated": "2017-02-21T02:23:33.000+0000" }, { "id": "407979", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, use touchEnabled :'false' in blue view as a workaround.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-02-24T19:13:44.000+0000", "updated": "2017-02-24T19:13:44.000+0000" }, { "id": "408091", "author": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "body": "Thanks @Sharif AbuDarda\r\nIn my real app, Green View has many Blue View, every Blue View has its id.\r\nThe Blue Views must be click-able by default, but they are not.\r\nI think this maybe a bug", "updateAuthor": { "name": "ptquang86", "key": "ptquang86", "displayName": "Quang Pham", "active": true, "timeZone": "Asia/Jakarta" }, "created": "2017-02-28T02:22:24.000+0000", "updated": "2017-02-28T02:22:24.000+0000" }, { "id": "417866", "author": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We've seen the same behavior with multiple ImageViews & Labels each added to its own View and then all of them added to a Parent View. We put a listener on the Parent View and expect to catch all of the events, but we only get events where the child views do not obscure the Parent View. When we set touchEnabled: false on the ImageViews, then we got the behavior we expected - click events propagating from the child Views that encapsulate the ImageViews to the Parent View.\r\n\r\nBut the weird thing was that we didn't change any code and just one day our code stopped working until we added the touchEnabled: false props to the ImagesViews & Labels.\r\n\r\nAnd we see this ONLY on iOS using the 5.5.1 SDK with 10.3.1 libraries. We do not have to set touchEnabled on Android.", "updateAuthor": { "name": "jfalcone", "key": "jfalcone", "displayName": "Joe Falcone", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-04-21T22:31:12.000+0000", "updated": "2017-04-21T22:31:12.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }