{ "id": "149363", "key": "TIMOB-19137", "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": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-07-09T20:17:31.000+0000", "created": "2015-07-02T01:04:38.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "qe-4.1.0" ], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [ { "id": "48402", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "149696", "key": "TIMOB-19219", "fields": { "summary": "Windows: AlertDialog is not shown more than twice", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-07-15T02:10:05.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "h5.Description\r\n\r\nWhen showing an alert dialog if one is already shown then the app will throw a runtime error. \r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 1',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nlabel1.addEventListener('click', function(){\r\n\talert('hi');\r\n\tsetTimeout(function(){\r\n\t\talert('hi2');\r\n\t},1000);\r\n})\r\n\r\nwin1.add(label1);\r\n\r\nwin1.open();\r\n{code}\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Add the above code to an app.js\r\n2. Build to an emulator/device\r\n3. Tap the label\r\n4. Dismiss the alert and the runtime error\r\n5. Tap the label and then tap the close button\r\n\r\nh5.Actual result\r\n\r\n3. The app will throw a runtime error\r\n5. No runtime error as the first alert has been dismissed\r\n\r\nh5.Expected result\r\n\r\nA runtime error should not be thrown", "attachment": [], "flagged": false, "summary": "Windows: Showing an alert dialog when another alert dialog is on screen throws runtime error", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Windows 8.1\r\nAppc CLI (NPM): 4.1.0-1\r\nAppc CLI (Registry): 4.1.0-4\r\nTi SDK: 4.1.0.v20150701120122\r\nAppc Studio: 4.1.0.201507010234", "closedSprints": [ { "id": 443, "state": "closed", "name": "2015 Sprint 14 Windows", "startDate": "2015-07-06T04:01:52.896Z", "endDate": "2015-07-19T03:59:00.000Z", "completeDate": "2015-07-20T22:18:14.505Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "357147", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "For comparison: on iOS, when I tried this, the first alert dialog remained open until I dismissed it, then the second one appeared. So it basically waited until the first was done. Looks like we need to implement some queue or locking mechanism for subsequent dialogs to wait until the first is dismissed.\r\n\r\nHere's the relevant code in iOS: https://github.com/appcelerator/titanium_mobile/blob/17dc8754653daaff170ea0c18f74218168a5633e/iphone/Classes/TiUIAlertDialogProxy.m#L90\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2015-07-07T14:23:53.000+0000", "updated": "2015-07-07T14:23:53.000+0000" }, { "id": "357377", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_windows/pull/367", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-09T18:25:07.000+0000", "updated": "2015-07-09T18:25:07.000+0000" }, { "id": "357500", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nShowing an alert dialog with another dialog now does not throw any runtime error.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio: 4.1.0.201507071122\r\nTi SDK: 4.2.0.v20150710092422\r\nTi CLI: 4.0.1\r\nAlloy: 1.6.2\r\nWindows: 8.1 Enterprise 64-bit\r\nAPPC NPM: 4.1.0\r\nAPPC CLI: 4.1.0\r\nDevice: Nokia Lumia 928 - Windows Phone 8.1\r\nWindows emulator : 8.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-07-10T22:02:49.000+0000", "updated": "2015-07-10T22:02:49.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }