{ "id": "174147", "key": "TIMOB-27500", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2020-01-14T23:49:09.000+0000", "created": "2019-09-19T08:38:20.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "android", "drawerlayout", "engTriage", "event", "open" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-01-15T07:50:46.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": [], "description": "When attaching the eventListener \"open\" to the drawer view, this also triggers the \"open\" eventListener of the parent window it has been added to.\r\n\r\nEDIT: it also happens with the close event.\r\n\r\nSDK: 8.1.1.GA\r\n\r\nCode example:\r\n\r\n{code:java}\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar leftView = Ti.UI.createView({ backgroundColor:'red' });\r\nvar centerView = Ti.UI.createView({ backgroundColor:'yellow' });\r\nvar rightView = Ti.UI.createView({ backgroundColor:'orange' });\r\n\r\nvar drawer = Ti.UI.Android.createDrawerLayout({\r\n leftView: leftView,\r\n centerView: centerView,\r\n rightView: rightView\r\n});\r\nvar btn = Ti.UI.createButton({ title: 'RIGHT' });\r\n\r\nbtn.addEventListener('click', function() {\r\n drawer.toggleRight();\r\n});\r\n\r\ncenterView.add(btn);\r\n\r\nwin.addEventListener('open', function(){\r\n\t\r\n\tconsole.log('window opened');\t\r\n\t\r\n var activity = win.getActivity(),\r\n actionBar = activity.getActionBar();\r\n\r\n if (actionBar) {\r\n actionBar.displayHomeAsUp = true;\r\n actionBar.onHomeIconItemSelected = function() {\r\n drawer.toggleLeft();\r\n };\r\n }\r\n});\r\n\r\ndrawer.addEventListener('open', function() {\r\n\tconsole.log('drawer opened');\t\r\n});\r\n\r\ndrawer.addEventListener('close', function() {\r\n\tconsole.log('drawer closed');\t\r\n});\r\n\r\nwin.add(drawer);\r\nwin.open();\r\n\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android DrawerLayout \"open\" event also fires \"open\" event of parent Window", "creator": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": null, "comment": { "comments": [ { "id": "452256", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~arif], I was able to reproduce the issue in SDK 8.2.0.GA. I will forward this to the engineering team to investigate. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-10-25T00:49:27.000+0000", "updated": "2019-10-25T00:49:27.000+0000" }, { "id": "453709", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid, this is not a bug. {{bubbleParent}} is set to {{true}} by default, you must set it to {{false}} to prevent events from bubbling up to parent views.\r\n\r\n{code:js}\r\nTi.UI.Android.createDrawerLayout({\r\n bubbleParent: false,\r\n ...\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-14T23:49:09.000+0000", "updated": "2020-01-14T23:49:09.000+0000" }, { "id": "453712", "author": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Nice one, can be that simple sometimes :-)\r\n\r\nThanks for checking this!", "updateAuthor": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2020-01-15T07:50:46.000+0000", "updated": "2020-01-15T07:50:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }