{ "id": "155657", "key": "TIMOB-20560", "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": "2017-05-03T12:23:29.000+0000", "created": "2016-03-11T23:45:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-5.2.1" ], "versions": [ { "id": "17684", "name": "Release 5.2.1", "archived": false, "released": true, "releaseDate": "2016-03-25" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:37:01.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": "A button will fire an event listener for the button and the window \r\n\r\n*Steps to reproduce:* \r\n\r\n# Use the app.js bellow\r\n\r\n*Actual :* \r\n\r\nBoth events are fired when the button is clicked\r\n\r\n*Expected:* \r\n\r\nOnly the button event is fired when the button is clicked and only the window event is fired when the window is clicked \r\n\r\n*App.js:* \r\n\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar button = Titanium.UI.createButton({title: 'click'});\r\n\r\n\twindow.add(button);\r\n\r\nbutton.addEventListener('click', function() {\r\n\t// alert('Button');\r\n\twindow.close();\r\n});\r\n\t\r\nwindow.addEventListener('click', function() {\r\n\t\r\n\t// alert('Window');\r\n Titanium.Media.openPhotoGallery({\r\n\r\n success: function(event) {\r\n alert('success');\r\n },\r\n cancel: function(cancel) {\r\n alert('cancel');\r\n },\r\n error: function(error) {\r\n alert('error');\r\n }\r\n });\r\n });\r\n window.open();\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: A button will fire an event listener for the button and the window ", "creator": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "environment": "Nexus 6 (6.0)\r\nMac OSX El Capitan 10.11.3\r\nStudio: 4.5.0.201602170821\r\nTi SDK: 5.2.1.v20160307134704\r\nAppc NPM: 4.2.4-2\r\nAppc CLI: 5.2.1-12\r\nNode v4.2.4", "closedSprints": [ { "id": 883, "state": "closed", "name": "2017 Sprint 09 SDK", "startDate": "2017-04-23T21:46:54.309Z", "endDate": "2017-05-07T21:46:00.000Z", "completeDate": "2017-05-08T00:25:44.276Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "419011", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jlongton] This is expected behaviour (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Proxy-property-bubbleParent)\r\n\r\n\"Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window.\"\r\n\r\nAnd can be controlled by {{bubbleParent}}\r\n\r\n{code:js}\r\nvar win = Ti.UI.createWindow(),\r\n btn = Titanium.UI.createButton({\r\n title: 'BUTTON',\r\n bubbleParent: false\r\n });\r\n\r\nbtn.addEventListener('click', function() {\r\n\talert('button');\r\n});\r\n\r\nwin.addEventListener('click', function() {\r\n\talert('window');\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-03T12:21:48.000+0000", "updated": "2017-05-03T12:23:18.000+0000" }, { "id": "439913", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as invalid. If incorrect, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:37:01.000+0000", "updated": "2018-08-06T17:37:01.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }