[TIMOB-9652] MobileWeb: scrollView - does not scroll correctly when contentHeight is changed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-09T15:03:25.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Sprint 2012-14 API, Release 2.1.1, Release 3.0.0 |
Components | MobileWeb |
Labels | MobileWeb, api, qe-testadded, release-note |
Reporter | Jon Alter |
Assignee | Bryan Hughes |
Created | 2012-06-19T17:56:41.000+0000 |
Updated | 2014-01-13T22:33:37.000+0000 |
Description
ScrollView does not scroll when contentHeight is changed
Steps to repro:
0. Run the code below 1. Click the button 2. Scroll the view (you can't scroll to the bottom)
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
win.open();
var scrollView = Titanium.UI.createScrollView({
contentWidth:'auto',
contentHeight:'auto',
top:0,
showVerticalScrollIndicator:true,
showHorizontalScrollIndicator:true
});
var view = Ti.UI.createView({
backgroundColor:'#336699',
borderRadius:10,
width:300,
height:400,
top:10
});
scrollView.add(view);
var button = Ti.UI.createButton({
title: 'Click me'
});
button.addEventListener("click", function(){
view.height = (view.height === 2000) ? 400 : 2000;
});
view.add(button);
win.add(scrollView);
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2519
2.1.1 backport PR: https://github.com/appcelerator/titanium_mobile/pull/2550
Verified the issue & we are able to scroll when the content height is changed. Tested On: Titanium studio : 2.1.1.201207171343 SDK version : 2.1.1.v20120723131610 iphone 5.0.1 android 2.3.6 -default browser. Thus closing the issue.