Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7910] MobileWeb: Truncated text in FireFox with width:'auto'

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-21T22:10:16.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsMobileWeb
Labelsdr-list, mw-list, qe-port
ReporterTony Lukasavage
AssigneeBryan Hughes
Created2012-03-07T06:23:32.000+0000
Updated2012-08-16T10:11:39.000+0000

Description

Problem

When using width:'auto' to define the width of a Ti.UI.Label` in a mobileweb project, the text of the label is often being truncated when rendered in FireFox, version 10.0.2 in my case. This does _not_ occur in Chrome (17.0.963.56) or Safari (5.1.2).

Test Case

var win = Ti.UI.createWindow({
	backgroundColor: '#fff'
});
var label = Ti.UI.createLabel({
	text: 'default text',
	height: 'auto',
	width: 'auto'
});
win.add(label);
win.open();

Results

The above test case will show only the word *"default"* in FF 10.0.2, but shows the full text *"default text"* on Chrome and Safari.

Comments

  1. Bryan Hughes 2012-03-21

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1791
  2. Lokesh Choudhary 2012-08-16

    Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120816015712 Android 4.0.4 - default ,chrome 18.0 , firefox 14.0.1 Iphone 5.1.1 - safari mobile Mountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1

JSON Source