{ "id": "109760", "key": "TIMOB-12753", "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": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-29T00:06:01.000+0000", "created": "2013-02-15T16:48:28.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-14T20:42:55.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": "h1. Problem description\r\nAdding a custom event listener to a window, then closing and re-opening the window, does not fire the event.\r\n\r\nh1. Steps to reproduce\r\nUse the following code; when switching between win2 and win1, the fireEvent does not work; it is working fine on iOS.\r\n\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor: \"#FFF\",\r\n layout: \"vertical\",\r\n fullscreen: true\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor: \"#CCC\",\r\n layout: \"vertical\",\r\n fullscreen: true\r\n});\r\n\r\nvar addSwitchButton = function(caption, newWindow, oldWindow) {\r\n var switchButton = Ti.UI.createButton({\r\n title: caption,\r\n top: 50,\r\n height: 50\r\n });\r\n oldWindow.add(switchButton);\r\n switchButton.addEventListener(\"click\", function(e) {\r\n newWindow.open({\r\n animated: false\r\n });\r\n oldWindow.close({\r\n animated: false\r\n });\r\n newWindow.fireEvent(\"customEvent\", {\r\n firedFromButton: false\r\n });\r\n });\r\n};\r\n\r\naddSwitchButton(\"Switch to window 2.\", win2, win1);\r\naddSwitchButton(\"Switch to window 1.\", win1, win2);\r\n\r\nwin1.addEventListener(\"customEvent\", function(e) {\r\n Ti.API.info(\"Custom Event, fired from button: \" + (e.firedFromButton ? \"yes\" : \"no\"));\r\n});\r\n\r\nvar testButton = Ti.UI.createButton({\r\n title: \"Fire custom event.\",\r\n top: 50,\r\n height: 50\r\n});\r\nwin1.add(testButton);\r\ntestButton.addEventListener(\"click\", function(e) {\r\n win1.fireEvent(\"customEvent\", {\r\n firedFromButton: true\r\n });\r\n});\r\n\r\nwin1.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Window fireEvent stop working when switching between heavyweight windows", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Android\r\nSDK 3.0.0.GA", "comment": { "comments": [ { "id": "290129", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving this as per updated test results. We tested the issue with TISDK 3.2GA and we could not reproduce it.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-01-29T00:06:01.000+0000", "updated": "2014-01-29T00:06:01.000+0000" }, { "id": "412284", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T20:42:55.000+0000", "updated": "2017-03-14T20:42:55.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }