[TIMOB-10723] MobileWeb: Scrollable view "addView" method not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-01-08T14:31:03.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | Release 3.0.1, Release 3.1.0, 2012 Sprint 26 JS, 2012 Sprint 26 |
Components | MobileWeb |
Labels | api, parity, qe-port |
Reporter | Arthur Evans |
Assignee | Bryan Hughes |
Created | 2012-08-30T10:19:35.000+0000 |
Updated | 2013-01-26T02:08:18.000+0000 |
Description
Using the same code from the original bug, the scrollable view locks up on Mobile Web (won't scroll).
I thought it was because it was placed in a table view row, but actually commenting out the call to
addView
fixes the problem. This works in iOS (and as of 2.1.2, in Android as well).
Repo Steps
1. Run the below code in your app.js 2. You can't see the yellow view added to the scrollable view.
var win = Ti.UI.createWindow({backgroundColor:'white'});
var table = Titanium.UI.createTableView();
win.add(table);
var row = Titanium.UI.createTableViewRow();
table.appendRow(row);
var view1 = Ti.UI.createView({ backgroundColor:'red' });
var view2 = Ti.UI.createView({ backgroundColor:'green' });
var view3 = Ti.UI.createView({ backgroundColor:'blue' });
var scrollableView = Ti.UI.createScrollableView({
views:[view1,view2,view3],
showPagingControl:true,
height: 200
});
var view4 = Ti.UI.createView({backgroundColor:'yellow'});
scrollableView.addView(view4);
row.add(scrollableView);
win.open();
Verified this is indeed a valid bug. :(
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/3569
3_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/3611
Closing. Tested and verified fix with: Titanium Studio, build: 3.0.1.201212181159 Titanium SDK, build: 3.0.2.v20130125144710 Chrome 23.0 iPhone5 6.0 Nexus4 4.2