Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7964] iOS: Textfield with hintText and 'auto' width/height has 0 for width/height

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-04-04T11:37:17.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 3.0.2
ComponentsiOS
Labelsparity
ReporterAllen Yeung
Assigneejithinpv
Created2012-03-12T16:34:03.000+0000
Updated2017-03-17T18:44:05.000+0000

Description

We should probably have a visible text field if it has hintText. Here is the code I used:
var win = Ti.UI.createWindow({backgroundColor:'white'});
win.layout = 'vertical';  

for (var i = 0; i < 3; i++) {
    win.add(
        Ti.UI.createLabel({
            text: 'This is label ' + i,
            color: 'black',
            width: 'auto',
            height: 'auto'
    }));
    win.add(
        Ti.UI.createTextField({
            hintText: 'This is text field ' + i,
            width: 'auto',
            height: 'auto'
    }));
    win.add(
        Ti.UI.createButton({
            title: 'This is button ' + i,
            width: 'auto',
            height: 'auto'
    }));
}

win.open();

Expected Result: There should be three text fields that is big enough to fit the size of the hintText Actual Result: The text fields have 0 width/height, which makes it invisible.

Comments

  1. jithinpv 2013-04-04

    Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-03-17

    Closing ticket as the issue cannot be reproduced.

JSON Source