{ "id": "99758", "key": "TIMOB-10601", "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": "14098", "description": "Sprint 2012-18 API", "name": "Sprint 2012-18 API", "archived": true, "released": true, "releaseDate": "2012-09-10" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-08-29T14:36:39.000+0000", "created": "2012-08-24T13:16:54.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "qe-ios082012" ], "versions": [ { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-17T23:52:13.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Description:\r\nButtonBar does not remain static, it redraws itself on each click event.\r\n\r\nIt is not a regression, it occurs on 2.1.1 as well.\r\n\r\nTest steps:\r\n1. Run this code from TIMOB-6463\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar datasource=[],textFieldArray=[],table,rowId=1,textFieldId= 0;\r\nvar win1 = Titanium.UI.createWindow({\r\n title:'Window',\r\n barColor:'#808080',\r\n \r\n});\r\n \r\nvar scrollView = Ti.UI.createScrollView({\r\n top:0,\r\n bottom:0,\r\n right:0,\r\n left:0,\r\n contentWidth:320,\r\n contentHeight:'auto',\r\n layout:'vertical',\r\n backgroundColor:'#fff'\r\n});\r\n \r\nfor (i = 0; i <=12; i++) {\r\n var row = createRows(rowId);\r\n scrollView.add(row);\r\n rowId++;\r\n}\r\n \r\nwin1.add(scrollView);\r\n \r\nfunction createRows(_rowId) {\r\n \r\n var flexSpace = Titanium.UI.createButton({\r\n systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE\r\n });\r\n \r\n var navButtons = Titanium.UI.createButtonBar({\r\n labels:['Previous','Next'],\r\n backgroundColor:'#000',\r\n top:100,\r\n style:Titanium.UI.iPhone.SystemButtonStyle.BAR,\r\n height:25,\r\n width:'auto'\r\n });\r\n var done = Titanium.UI.createButton({\r\n systemButton:Titanium.UI.iPhone.SystemButton.DONE\r\n });\r\n var inputTextField = Titanium.UI.createTextField({\r\n color : '#ff7c00',\r\n top : 5,\r\n height : 50,\r\n textAlign : 'right',\r\n width : '25%',\r\n hintText : '',\r\n left : '65%',\r\n right : '8%',\r\n keyboardToolbar : [navButtons,flexSpace,done],\r\n keyboardToolbarColor : '#898989',\r\n returnKeyType : Titanium.UI.RETURNKEY_DEFAULT,\r\n borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n keyboardType : Titanium.UI.KEYBOARD_NUMBER_PAD,\r\n font : {\r\n fontSize : 20,\r\n fontColor : '#ff7c00',\r\n fontWeight : 'bold',\r\n fontFamily : 'Helvetica Neue'\r\n }\r\n });\r\n inputTextField.rowId=_rowId;\r\n textFieldId = textFieldId + 1;\r\n inputTextField.id = textFieldId;\r\n textFieldArray.push(inputTextField);\r\n //prevent inputTextField from being GCed due to a bug.\r\n // inputTextField.addEventListener(\r\n // 'blur', function(e) {\r\n // });\r\n navButtons.addEventListener('click', function(e) {\r\n max = textFieldArray.length;\r\n \r\n if(e.index ===0) { /*Prev Tab*/\r\n \r\n if( inputTextField.id ===1) {\r\n done.fireEvent('click');\r\n } else {\r\n var rowIndex=inputTextField.rowId-1;\r\n Ti.API.info(\"change focus of row: \"+ rowIndex );\r\n changeFocus(rowIndex,0,textFieldArray);\r\n }\r\n } else { /*Next Tab*/\r\n if(inputTextField.id === max) {\r\n done.fireEvent('click');\r\n } else {\r\n var rowIndex=inputTextField.rowId + 1;\r\n Ti.API.info(\"change focus of row: \"+ rowIndex );\r\n changeFocus(rowIndex,1,textFieldArray) ;\r\n }\r\n }\r\n \r\n });\r\n done.addEventListener('click', function() {\r\n for(i=0,j=textFieldArray.length;i