[TIMOB-14798] TiAPI: Inconsistency of default value of the text property of a Label between iOS and Android
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.1.1, Release 3.2.0 |
| Fix Version/s | n/a |
| Components | Core |
| Labels | default, label, parity, text |
| Reporter | Hani Hamadeh |
| Assignee | Unknown |
| Created | 2013-08-09T17:30:00.000+0000 |
| Updated | 2018-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();
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.