Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14798] TiAPI: Inconsistency of default value of the text property of a Label between iOS and Android

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.1, Release 3.2.0
Fix Version/sn/a
ComponentsCore
Labelsdefault, label, parity, text
ReporterHani Hamadeh
AssigneeUnknown
Created2013-08-09T17:30:00.000+0000
Updated2018-02-28T20:03:47.000+0000

Description

This code alerts "String empty" on Android and "String not empty" on iOS:
var win = Ti.UI.createWindow({
	backgroundColor : 'white'
});

var lbl = Ti.UI.createLabel();

if (lbl.text === "") {
	alert('String empty');
} else {
	alert('String not empty');
}

win.add(lbl);

win.open();

Comments

  1. Daniel Sefton 2013-08-09

    Tested and confirmed on iOS 6 simulator and Samsung Galaxy S2 2.3.6 with Ti SDK 3.1.1 GA and latest 3.2 CI.

JSON Source