Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19048] Windows: Word wrap on labels does not work if width and height are not set

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-07-17T13:56:49.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 5.0.0
ComponentsWindows
Labelsqe-4.1.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2015-06-19T18:11:29.000+0000
Updated2015-07-27T21:27:41.000+0000

Description

Description

When using a label, the word wrap will not work unless the height and width are set
var win = Ti.UI.createWindow({backgroundColor: 'red'});

var lbl = Ti.UI.createLabel({
    text: '*** Resources Dir: Test presence of file that exists => blahTest presence of file that does not exist => bleh*** appData Dir:Test presence of file that exists => meh Test presence of file that does not exist => merh',
    color: 'black'
});

win.add(lbl);
win.open();
*Marking this as minor as it is a simple _workaround_*

Steps To Reproduce

1. Add the above code to an existing app.js file 2. Run on a device or emulator 3. Add the following to the label creation width: Ti.UI.FILL, height: Ti.UI.FILL 4. Run on device or emulator

Actual Result

2. The text is not word wrapped 4. The text is word wrapped

Expected Result

The text should be word wrapped both times

Comments

  1. Christopher Williams 2015-06-23

    Bumping to 4.1.1
  2. Gary Mathews 2015-06-23

    PR: https://github.com/appcelerator/titanium_mobile_windows/pull/317
  3. Fokke Zandbergen 2015-07-01

    Seems like in 4.1.0 beta (4.1.0.v20150626223333) a Label uses Ti.UI.FILL instead of Ti.UI.SIZE as default.
  4. Gary Mathews 2015-07-01

    [~fokkezb] Yes, this has been fixed in latest SDK.
  5. Fokke Zandbergen 2015-07-02

    I saw that has been fixed in last night's build. The wordwrap has not however.
  6. Kota Iguchi 2015-07-16

    https://github.com/appcelerator/titanium_mobile_windows/pull/380
  7. Lokesh Choudhary 2015-07-27

    Verified the fix. The labels's are word wrapped. Closing. Environment: Appc Studio: 4.1.1.201507141126 Ti SDK: 4.2.0.v20150724170431 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0 APPC CLI: 4.1.2 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1

JSON Source