Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9430] MobileWeb: Fractional percentage in layout not working in MobileWeb

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-14T13:51:34.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 MW
ComponentsMobileWeb
Labelsparity
ReporterMauro Parra-Miranda
AssigneeBryan Hughes
Created2012-06-06T16:34:19.000+0000
Updated2012-06-26T14:00:08.000+0000

Description

Problem Description

When you are specifying the left or right of a button, you can use fractional percentages in iOS or Android. On MobileWeb, it fails.

Actual Results

The buttons are broken if using fractional percentages. Should work as in iOS.

Expected Results

Working as nice as in iOS.

Test Case

1. Create mobile project. 2. Paste app.js:
var win1 = Titanium.UI.createWindow({backgroundColor:'#FFFFFF'});


var mView = Ti.UI.createView({
			top:20,
			height:90,
			backgroundColor:'#000'
		});

var bar1 = Ti.UI.createButton({
			height : 41,
			left : '5%',
			right : '52.5%',//'52.5%'
			title : 'Reset',
			visible : true,
			backgroundImage : '/KS_nav_ui.png',
			font : {
				fontSize : 16,
				fontWeight : 'bold',
				fontFamily : 'Helvetica Neue',
				fontColor:'black',
			},
			color : '#FFFFFF'
		});
var bar2 = Ti.UI.createButton({
			height : 41,
			left : '52.5%',//'52.5%'
			right : '5%',
			title : 'continue',
			visible : true,
			backgroundImage : '/KS_nav_ui.png',
			font : {
				fontSize : 16,
				fontWeight : 'bold',
				fontFamily : 'Helvetica Neue'
			},
			color : '#FFFFFF'
		});
		
mView.add(bar1);
mView.add(bar2);
win1.add(mView)
win1.open();
3. Run it in ios. 4. Run it in mobile web

Attachments

FileDateSize
Screen Shot 2012-06-06 at 4.32.23 PM.png2012-06-06T16:34:19.000+000021684
Screen Shot 2012-06-06 at 4.33.30 PM.png2012-06-06T16:34:19.000+000018695

Comments

  1. Bryan Hughes 2012-06-12

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2380
  2. Lokesh Choudhary 2012-06-26

    Verified the issue on the environment below & found that the buttons are appearing as expected in IOS. Titanium Studio : 2.1.0.201206251749 SDK version : 2.1.0.v20120626104306 Chrome : 19.0.1084.56

JSON Source