{ "id": "64129", "key": "TIMOB-3497", "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": "11355", "description": "Mobile 1.8.0 M02", "name": "Sprint 2011-23", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-06T15:44:05.000+0000", "created": "2011-04-15T03:45:55.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-06-06T15:53:34.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": "{html}

When changing orientation mode from portrait to landscape and\r\nvice versa, the current view changes. (though the currentPage will\r\nbe correct, the visible view on screen is incorrect)
\r\nThis has been tested on 1.6.1 and 1.6.x CI build. And iPhone\r\n4.2

\r\n

Steps to reproduce this error:
\r\nScroll to view 22 while in portrait mode.
\r\nRotate to landscape mode.
\r\nRotate back to portrait mode. (you'll notice the view changes to\r\n29)
\r\nRotate to landscape mode. (the view changes to view 19)
\r\nThe currentPage is still 22.

\r\n

Code:

\r\n
\r\nvar win = Titanium.UI.createWindow({  \r\n    backgroundColor:'#fff',\r\n    orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT, \r\n    Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT]\r\n});\r\nvar views_arr = [];\r\nfor(var i=0; i<30; i++) {\r\n    views_arr[i] = Ti.UI.createView({\r\n        top:0,\r\n        left:0,\r\n        width:320,\r\n        height:480,\r\n        borderColor:'#00F',\r\n        borderWidth:1 \r\n    });\r\n    var lbl = Titanium.UI.createLabel({\r\n        text:'view '+i,\r\n        color:'#000',\r\n        top: 50,\r\n        left:50\r\n    });\r\n    views_arr[i].add(lbl);\r\n}\r\n\r\nscrollableView = Titanium.UI.createScrollableView({\r\n    views: views_arr,\r\n    top: 0,\r\n    left: 0,\r\n    width:'100%',\r\n    height:'100%'\r\n});\r\nTitanium.Gesture.addEventListener('orientationchange', function(e){\r\n    Ti.API.info('CurrentPage: ' + scrollableView.currentPage);      \r\n});\r\nwin.add(scrollableView);\r\nwin.open();\r\n
{html}", "attachment": [], "flagged": false, "summary": "ScrollView and OrientationChange iPhone issue", "creator": { "name": "danieltome", "key": "danieltome", "displayName": "Daniel Tome", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "danieltome", "key": "danieltome", "displayName": "Daniel Tome", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "133257", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This is still not working in the latest 1.6.3 from Apr 18 2011 16:23 (rb8672b44).\nTested in iPhone Simulator 4.3\n\nAnd there is a helpdesk customer that has encounter this: Ticket number APP-856157 (it is private and not visible to the public)\n", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-05-06T04:02:26.000+0000", "updated": "2011-05-06T04:02:26.000+0000" }, { "id": "140631", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "We have another customer in the Helpdesk asking for this fix - using 1.7.0 RC1 and 1.8\r\n\r\nhttp://support.appcelerator.com/tickets/APP-573311/homepage", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-06-06T08:10:49.000+0000", "updated": "2011-06-06T08:10:49.000+0000" }, { "id": "140662", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I fixed this in a previous checkin. ", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-06T15:44:05.000+0000", "updated": "2011-06-06T15:44:05.000+0000" }, { "id": "140669", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified View remains at 22 regardless of orientation change. Tested with simulator 4.3 and Verizon iPhone 4 (4.2.8) , Titanium Studio, build: 1.0.0.201106021621, Titanium SDK version: 1.8.0 r477c7b27. Closing.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-06T15:53:34.000+0000", "updated": "2011-06-06T15:53:34.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }