Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11295] Button with width auto or undefined does not work with image and title defined

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-21T09:30:06.000+0000
Affected Version/sRelease 2.1.3, Release 3.0.0
Fix Version/sRelease 3.0.0, Sprint 2012-20 API, 2012 Sprint 20
ComponentsiOS
Labelsapi, button, layout, module_button, qe-testadded
ReporterVishal Duggal
AssigneeVishal Duggal
Created2012-10-08T17:00:58.000+0000
Updated2014-06-19T12:42:41.000+0000

Description

Create a new project and drop in this test code. First button is ok, the next two are bad.
var win = Ti.UI.createWindow({
	backgroundColor:'white'
});

var expected = Ti.UI.createButton({
	title:'TEST',
	image:'KS_nav_ui.png',
	width:Ti.UI.SIZE,
	top:10
});

var fail1 = Ti.UI.createButton({
	title:'TEST',
	image:'KS_nav_ui.png',
	width:'auto',
	top:60
});

var fail2 = Ti.UI.createButton({
	title:'TEST',
	image:'KS_nav_ui.png',
	top:110
});

win.add(expected);
win.add(fail1);
win.add(fail2);

win.open();

Comments

  1. Vishal Duggal 2012-10-08

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3126
  2. Natalie Huynh 2012-12-04

    Tested with 3.0.0.v20121130200208 with iPhone 4 5.1.1
  3. Priya Agarwal 2013-06-21

    Reopening just to update label
  4. Priya Agarwal 2013-06-21

    Updated label and verified. Tested on: Device: Nexus 7 tab Android Version 4.1 Simulator 6.0 SDK:3.1.2.v20130619101604 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.8 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1

JSON Source