Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9652] MobileWeb: scrollView - does not scroll correctly when contentHeight is changed

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-09T15:03:25.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sSprint 2012-14 API, Release 2.1.1, Release 3.0.0
ComponentsMobileWeb
LabelsMobileWeb, api, qe-testadded, release-note
ReporterJon Alter
AssigneeBryan Hughes
Created2012-06-19T17:56:41.000+0000
Updated2014-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);

Comments

  1. Bryan Hughes 2012-07-12

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2519
  2. Bryan Hughes 2012-07-12

    2.1.1 backport PR: https://github.com/appcelerator/titanium_mobile/pull/2550
  3. Lokesh Choudhary 2012-07-24

    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.

JSON Source