{ "id": "106056", "key": "TIMOB-11977", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "14811", "description": "2013 Sprint 01 API", "name": "2013 Sprint 01 API", "archived": true, "released": true, "releaseDate": "2013-01-14" }, { "id": "14804", "description": "2013 Sprint 01", "name": "2013 Sprint 01", "archived": true, "released": true, "releaseDate": "2013-01-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-02T18:21:46.000+0000", "created": "2012-12-06T11:09:32.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_scrollView", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:44:15.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": "h1. Problem description\r\nWhen a View has a width set in percent, and a ScrollView is put inside it, the ScrollView scrolls horizontally even if the content does not exceed the width of the View.\r\n\r\nh1. Steps to reproduce\r\nUse the following code to see the issue\r\n\r\n{code}\r\n// Create a window\r\nvar win1 = Ti.UI.createWindow({\r\n\tbackgroundColor : 'white'\r\n});\r\n\r\n\r\nvar Container = Ti.UI.createView({top: 255,\r\n width:'95%'});\r\nvar ScrollArea = Ti.UI.createScrollView({\r\n left: 12,\r\n top: 36,\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.SIZE,\r\n layout: 'vertical',\r\n backgroundColor: '#00f',\r\n borderRadius:1, \r\n borderColor: '#f00'}\r\n );\r\nvar label = Ti.UI.createLabel({\r\n text:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ultrices, ante ut aliquam tempor, lorem velit semper est, at vehicula eros purus eget sem. Etiam eget sapien ut purus rutrum fringilla. Duis non est sit amet sem tincidunt aliquam. Sed bibendum molestie nisl quis dictum. Cras vitae dui ligula. Phasellus nec lectus nec metus venenatis laoreet. Suspendisse aliquam justo porta massa tempus et auctor eros gravida. Suspendisse at aliquet ipsum. Maecenas tincidunt sagittis feugiat. Sed pellentesque sem at augue tincidunt vel condimentum diam porta. Curabitur tempor egestas odio, at ultrices lacus lacinia in.',\r\n height: Ti.UI.SIZE,\r\n color: '#4b4b4b',\r\n width: '94%',\r\n wordWrap: true,\r\n backgroundColor: '#0Ff',\r\n borderRadius:1, \r\n borderColor: '#0f0'});\r\n ScrollArea.add(label);\r\n\r\n Container.add(ScrollArea);\r\n\r\nwin1.add(Container);\r\n\r\nwin1.open();\r\n{code}\r\n\r\nAs you can see, the width of the View is 95%, and if you try to scroll horizontally you can see the text bouncing inside it. If the View width is set to a fixed size - say 400 - this behavior doesn't occur.", "attachment": [], "flagged": false, "summary": "iOS: ScrollView inside a View with percentage width is scrolling horizontally even if it shouldn't", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 6\r\nSDK 2.1.4", "comment": { "comments": [ { "id": "231820", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Seems to be working fine with 3.0.0 GA", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-12-18T10:57:54.000+0000", "updated": "2012-12-18T10:57:54.000+0000" }, { "id": "231825", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Regarding my previous comment: it DOES work on the iPhone, but still not working on iPad. Bug still open.", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-12-18T12:20:51.000+0000", "updated": "2012-12-18T12:20:51.000+0000" }, { "id": "232874", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/3651", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-01-02T17:58:54.000+0000", "updated": "2013-01-02T17:58:54.000+0000" }, { "id": "232875", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull ready. Test on iPAD", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-01-02T17:59:35.000+0000", "updated": "2013-01-02T17:59:35.000+0000" }, { "id": "232881", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Code Review & Functional Review", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-02T18:21:46.000+0000", "updated": "2013-01-02T18:21:46.000+0000" }, { "id": "234708", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with:\r\nSDK:3.1.0.v20130114171802\r\nStudio:3.0.1.201212181159\r\nDevice: iPad3(v6.0)\r\n\r\nScrollview inside a view does not scroll horizontally if it should not.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-17T01:54:30.000+0000", "updated": "2013-01-17T01:54:30.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }