{ "id": "120196", "key": "TIMOB-15281", "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": "15691", "description": "2013 Sprint 19", "name": "2013 Sprint 19", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15693", "description": "2013 Sprint 19 API", "name": "2013 Sprint 19 API", "archived": true, "released": true, "releaseDate": "2013-09-20" }, { "id": "15747", "description": "Release 3.1.4", "name": "Release 3.1.4", "archived": true, "released": false }, { "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": "2013-09-20T21:53:42.000+0000", "created": "2013-09-19T14:00:03.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Titanium", "ios7", "mobilesdk", "module_tableview", "qe-testadded" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [ { "id": "32162", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "104474", "key": "TIMOB-11676", "fields": { "summary": "iOS: KitchenSink - the search bar failed to return the screen's width after orientation was changed", "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": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-25T21:00:21.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": "When we rotate the device to landscape mode and then take it back to portrait mode. Table view search bar reduces to 50% width without performing that action.\r\n\r\n*Steps to reproduce*\r\n1: Use the below sample code and use it new sample project.\r\n2: run the sample on iOS simulator.\r\n3: rotate the simulator to landscape mode.\r\n4: now rotate the simulator to portrait mode.\r\n \r\nresult: Search bar gets half of width automatically.\r\n\r\n*Sample code*\r\n{code}\r\nvar rootWin = Ti.UI.createWindow({\r\n\ttitle : L('rootWinTitle'),\r\n\tbackgroundColor : 'yellow',\r\n\torientationModes : [Titanium.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Titanium.UI.UPSIDE_PORTRAIT, Ti.UI.LANDSCAPE_RIGHT]\r\n});\r\n\r\nvar filterBox = Ti.UI.createSearchBar({\r\n\tvisible : true, /*backgroundImage: \"/Images/search_box_background.png\", */\r\n\thintText : \"Filter this list\",\r\n\twidth : Ti.UI.FILL\r\n});\r\n\r\nvar props = {\r\n\tfilterCaseInsensitive : true,\r\n\ttop : 0,\r\n\tsearch : filterBox,\r\n\twidth : \"100%\",\r\n\trowHeight : 42,\r\n\tbackgroundColor : \"#FFF\",\r\n\tseparatorColor : \"#b0b0b0\",\r\n\tallowsSelection : true,\r\n\tscrollable : true,\r\n\tsearchHidden : false,\r\n\thideSearchOnSelection : true,\r\n\tanchorPoint : {\r\n\t\tx : 0.5,\r\n\t\ty : 0.0\r\n\t}\r\n};\r\n// Rotates about its X axis, half way along.\r\n\r\nprops.style = Ti.UI.iPhone.TableViewStyle.PLAIN;\r\n/* GROUPED or PLAIN */\r\n\r\nvar tableView = Ti.UI.createTableView(props);\r\nvar i = 0;\r\nvar rows = [];\r\nvar indexes = [];\r\nfor ( i = 0; i < 20; i++) {\r\n\tvar tablerow = Ti.UI.createTableViewRow({\r\n\t\theight : 70,\r\n\t\tclassName : 'itemRow',\r\n\t\thasChild : true\r\n\t});\r\n\tvar imageview = Ti.UI.createImageView({\r\n\t\timage : \"imageUrl.jpg\",\r\n\t\theight : 36,\r\n\t\twidth : 36,\r\n\t\tleft : 5,\r\n\t\ttop : 17\r\n\t});\r\n\tvar titleview = Ti.UI.createLabel({\r\n\t\ttext : \"Item: \" + i,\r\n\t\tcolor : '#000',\r\n\t\theight : 65,\r\n\t\tfont : {\r\n\t\t\tfontSize : 15\r\n\t\t},\r\n\t\tleft : imageview.width + 10\r\n\t});\r\n\r\n\ttablerow.add(imageview);\r\n\ttablerow.add(titleview);\r\n\r\n\trows.push(tablerow);\r\n}\r\ntableView.setData(rows);\r\n\r\nvar indexes = [{\r\n\ttitle : '1',\r\n\tindex : 0\r\n}, {\r\n\ttitle : '2',\r\n\tindex : 1\r\n}, {\r\n\ttitle : '3',\r\n\tindex : 2\r\n}, {\r\n\ttitle : '4',\r\n\tindex : 3\r\n}, {\r\n\ttitle : '5',\r\n\tindex : 4\r\n}, {\r\n\ttitle : '6',\r\n\tindex : 5\r\n}, {\r\n\ttitle : '7',\r\n\tindex : 6\r\n}, {\r\n\ttitle : '8',\r\n\tindex : 7\r\n}, {\r\n\ttitle : '9',\r\n\tindex : 8\r\n}, {\r\n\ttitle : '10',\r\n\tindex : 9\r\n}, {\r\n\ttitle : '11',\r\n\tindex : 10\r\n}, {\r\n\ttitle : '12',\r\n\tindex : 11\r\n}, {\r\n\ttitle : '13',\r\n\tindex : 12\r\n}, {\r\n\ttitle : '14',\r\n\tindex : 13\r\n}, {\r\n\ttitle : '15',\r\n\tindex : 14\r\n}, {\r\n\ttitle : '16',\r\n\tindex : 15\r\n}, {\r\n\ttitle : '17',\r\n\tindex : 16\r\n}, {\r\n\ttitle : '18',\r\n\tindex : 17\r\n}, {\r\n\ttitle : '19',\r\n\tindex : 18\r\n}, {\r\n\ttitle : '20',\r\n\tindex : 19\r\n}];\r\n\r\ntableView.index = indexes;\r\n\r\n//mainWindow.add(tableView);\r\n\r\nrootWin.add(tableView);\r\n\r\nrootWin.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: TableView search bar reduces to 50% width when rotation is performed", "creator": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "anigam", "key": "anigam", "displayName": "Ashish Nigam", "active": true, "timeZone": "Asia/Kolkata" }, "environment": "Titanium Mobile SDK, iOS6,iOS7.", "comment": { "comments": [ { "id": "272140", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nhttps://github.com/appcelerator/titanium_mobile/pull/4717", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-20T17:23:29.000+0000", "updated": "2013-09-20T17:23:29.000+0000" }, { "id": "272207", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Backport to 3_1_X\nhttps://github.com/appcelerator/titanium_mobile/pull/4722", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-09-20T20:42:24.000+0000", "updated": "2013-09-20T20:42:24.000+0000" }, { "id": "275110", "author": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Tested with :\r\nOSX: 10.8.5\r\nXcode:5.0\r\nAppcelerator Studio: 3.2.0.201310112258\r\nSDK:3.2.0.v20131014204636\r\nacs:1.0.7\r\nalloy:1.2.2\r\nnpm:1.3.2\r\ntitanium:3.2.0\r\ntitanium-code-processo:1.0.3\r\nDevice: iPod touch2 (viOS7)", "updateAuthor": { "name": "prastogi", "key": "prastogi", "displayName": "Pragya Rastogi", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-10-15T09:31:34.000+0000", "updated": "2013-10-15T09:31:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }