problem
When adding a view with no positioning constraints to a ScrollView in Mobileweb, the view is positioned on the left side of the screen instead of in the center as the other platforms are.
expected
The view should be positioned in the middle of the Scrollview when no positioning properties are applied.
test case
Note that simply change
createScrollView
to
createView
causes the label to be centered as expected. When the ScrollView is used, it is positioned on the left.
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
modal: false,
exitOnClose: true
});
var container = Ti.UI.createView({
backgroundColor: '#888'
});
var label = Ti.UI.createLabel({
text: 'label',
height: 60,
width: 150,
backgroundColor: '#afa'
})
win.add(container);
container.add(label);
win.open();
This must have been changed: Mobile Web's behavior used to be the behavior on the other platforms (I remember because Mobile Web used to act the way iOS does now and I had to special case it out to the way Mobile Web acts now to match the other platforms).
Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
Closing as will not fix.