{ "id": "161452", "key": "TIMOB-23578", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-03-30T20:46:37.000+0000", "created": "2016-06-29T23:09:41.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "17684", "name": "Release 5.2.1", "archived": false, "released": true, "releaseDate": "2016-03-25" }, { "id": "17993", "description": "Release 5.2.2", "name": "Release 5.2.2", "archived": false, "released": true, "releaseDate": "2016-04-05" } ], "issuelinks": [], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-30T20:46:43.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": "h6. Issue Description\r\nIf we do a double click on a button, it opens two windows. This only happens in Android ver 4.3 and API 18. We tested on latest version of Android and do not see any issue.\r\n\r\nh6. Steps to Reproduce\r\n1. Create a new Appcelerator alloy project for Android\r\n2. Copy the view directory files into the new project created.(views.zip attached)\r\n3. Copy the Controller directory files into the new project.(controllers.zip attached)\r\n4. Copy the style directory files into the project.(styles.zip attached)\r\n\r\n\r\nh6. Expected Results\r\nClicking on button should create only single window", "attachment": [ { "id": "59686", "filename": "controllers.zip", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-06-29T23:07:44.000+0000", "size": 1536, "mimeType": "application/zip" }, { "id": "59685", "filename": "styles.zip", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-06-29T23:07:44.000+0000", "size": 1831, "mimeType": "application/zip" }, { "id": "59684", "filename": "views.zip", "author": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "created": "2016-06-29T23:07:44.000+0000", "size": 1334, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android 4.3: Error - Handle double clicked on views. (android)", "creator": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "subtasks": [], "reporter": { "name": "nmishra", "key": "nmishra", "displayName": "Neeraj Mishra", "active": true, "timeZone": "America/Phoenix" }, "environment": "Titanium sdk 5.2.1.GA and 5.2.2.GA \r\nSony Xperia Z 4.3 API 18\r\nStudio Version: 4.6.0.201605201934\r\n", "closedSprints": [ { "id": 685, "state": "closed", "name": "2016 Sprint 16 SDK", "startDate": "2016-07-30T00:40:02.939Z", "endDate": "2016-08-13T00:40:00.000Z", "completeDate": "2016-08-15T08:00:33.056Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "392177", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Tested on an API 18 emulator. Able to reproduce.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-02T03:36:29.000+0000", "updated": "2016-08-02T03:36:29.000+0000" }, { "id": "392178", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Classic app code:\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Double Click Here'\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n\r\nbtn.addEventListener('click', function(){\r\n\r\n var win2 = Ti.UI.createWindow({\r\n title:'Another Window',\r\n });\r\n var label1 = Titanium.UI.createLabel({\r\n color:'#999',\r\n text:'I am Another Window',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto'\r\n });\r\n win2.add(label1);\r\n win2.open();\r\n\r\n});\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-02T04:43:53.000+0000", "updated": "2016-08-02T04:43:53.000+0000" }, { "id": "392182", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~nmishra]\r\nThis is a workaround as it's an API 18 specific issue.\r\n\r\nIn your {{index.xml}} code, add an id to your button:\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nand in your {{index.js}} code, use this:\r\n{code}\r\n$.window.open();\r\n\r\nfunction showNormalView() {\r\n $.buttonId.enabled = false;\r\n\tvar win = Alloy.createController(\"NormalView\").getView();\r\n\twin.open();\r\n setTimeout(function() {\r\n $.buttonId.enabled = true;\r\n },500);\r\n}\r\n\r\nfunction showConfigedView() {\r\n\tvar win = Alloy.createController(\"DismissKeyboarWhenLoadView\").getView();\r\n\twin.open();\r\n}\r\n{code}\r\n\r\nWhat's happening is that in API 18, it seems that the system is slower and hence after you click the button, the new window is not opened yet and there is a split second you can click it again to open the window.\r\n\r\nThis workaround disables the button for that split second and enables it back again.\r\n\r\nPlease give it a try. I'll resolve this issue if this works for you.\r\n", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-08-02T05:47:28.000+0000", "updated": "2016-08-02T06:35:33.000+0000" }, { "id": "416372", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\". There has been no update for a while. If there is any problem, please open a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-30T20:44:05.000+0000", "updated": "2017-03-30T20:46:19.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }