{ "id": "79695", "key": "TIMOB-5125", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-05-23T18:42:33.000+0000", "created": "2011-08-26T14:19:25.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "exalture", "look1", "tbs-1.8.2" ], "versions": [ { "id": "12570", "name": "Release 1.7.5", "archived": true, "released": true, "releaseDate": "2011-11-02" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2017-03-21T21:06:35.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": "ScrollView, which has a WebView, scrolls to the position of WebView, when it is opened.\r\nIf there is more than one WebView added, then it shows (scrolls to) the position of the last added WebView.\r\n\r\nThe sample code is below.\r\nThis code had a ScrollView with a View and WebView added to it. When, the app is opened, by default the WebView is seen which is way below the View.\r\n\r\n*Sample Code*\r\n{noformat}\r\nvar win = Titanium.UI.createWindow({backgroundColor:'#fff'});\r\n\r\nvar scrollView = Titanium.UI.createScrollView({ contentWidth: 'auto', contentHeight: 'auto', showVerticalScrollIndicator: true, }); \r\nwin.add(scrollView);\r\n\r\nvar v = Ti.UI.createView({backgroundColor : 'red', height : 500, top : 100});\r\nscrollView.add(v);\r\n\r\nvar wv = Titanium.UI.createWebView({ url:'http://www.google.com', height: 300, top:1000, scalesPageToFit: true }); \r\nscrollView.add(wv);\r\n\r\nwin.open();\r\n\r\n// Workaround\r\n// wv.addEventListener('beforeload',function(){\r\n//\tscrollView.scrollTo(0,0);\r\n//\tscrollView.show();\r\n// });\r\n\r\n// win.addEventListener('open',function(){\r\n//\tscrollView.hide();\r\n// });\r\n{noformat}\r\n\r\n*Expected Behavior*\r\n- ScrollView should be at position (0,0) when it opens. In this case, the view with \"red\" background color should be seen in full.\r\n\r\n*Observed Behavior*\r\n- ScrollView shows the position of WebView. In this case, the WebView with \"http://www.google.com\" is seen in full and not the \"red\" colored view.\r\n\r\n*Steps to Reproduce*\r\n- Please use the sample code provided in app.js and the result is seen right away.\r\n\r\n*Other Observations*\r\n- If the ScrollView has more than one WebViews added, the WebView that was added last to the ScrollView will be shown.\r\n- For example, if the another WebView is added as below to the sample app, this WebView (with \"http://www.appcelerator.com\") is seen when the ScrollView opens\r\n- {noformat}\r\nvar wv1 = Ti.UI.createWebView({ url : 'http://www.appcelerator.com', height : 300, top : 700, scalesPageToFit : true });\r\nscrollView.add(wv1);\r\n{noformat}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Scrollview, with a WebView added, scrolls to the position of the WebView when the ScrollView opens", "creator": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhimavarapu", "key": "sbhimavarapu", "displayName": "Sandeep Bhimavarapu", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android : 2.2.2, 2.3.3 \r\nTi SDK : 1.7.5, Mobile CI(1.8.0.1.v20111202130506)\r\nHost Operating System: OSX 10.7.2\r\nDevice Details: emulator, LG VS910 4G", "comment": { "comments": [ { "id": "164229", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thomas discussed the reason for closing.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T16:53:56.000+0000", "updated": "2011-08-26T16:53:56.000+0000" }, { "id": "253692", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "This is an Android platform behavior to scroll to any focusable control which is in the visible area.The control doesn't need to be a webview, even a textview can be used to reproduce the behavior.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-05-23T18:42:33.000+0000", "updated": "2013-05-23T18:42:33.000+0000" }, { "id": "414410", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:06:35.000+0000", "updated": "2017-03-21T21:06:35.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }