Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14754] MobileWeb: Views are aligned to the left inside ScrollViews

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2017-06-26T20:10:53.000+0000
Affected Version/sRelease 3.1.2
Fix Version/sn/a
ComponentsMobileWeb
Labelsparity
ReporterTony Lukasavage
AssigneeChris Barber
Created2013-08-02T19:30:54.000+0000
Updated2018-04-04T23:20:30.000+0000

Description

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();

Comments

  1. Bryan Hughes 2013-08-02

    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).
  2. Lee Morris 2017-06-26

    Marking ticket as "Won't Fix" as MobileWeb has been deprecated.
  3. Eric Merriman 2018-04-04

    Closing as will not fix.

JSON Source