Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19982] iOS: Buttons in a text field: Left button not centered & right button does not show on focus

GitHub Issuen/a
TypeStory
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2015-11-14T07:37:38.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sn/a
Componentsn/a
Labelsqe-5.1.0, regression
ReporterHarry Bryant
AssigneeHans Knöchel
Created2015-11-13T22:40:58.000+0000
Updated2017-03-17T18:12:06.000+0000

Description

Description:

This is a *regression* between 5.0.2.GA - 5.1.0. The left button within a text field is no longer centered, but still responsive. The right button does not become visible upon focus of the text field.

Steps to reproduce:

1. appc ti sdk select 5.0.2.GA 2. Create a classic project. 3. Use following example code in app.js:
var win = Ti.UI.createWindow({
    backgroundcolor: 'red'
    });
    
    var leftButton = Titanium.UI.createButton({
        style:Titanium.UI.iPhone.SystemButton.DISCLOSURE
    });
    var rightButton = Titanium.UI.createButton({
        style:Titanium.UI.iPhone.SystemButton.INFO_DARK
    });
    
    leftButton.addEventListener('click',function()
    {
        Titanium.UI.createAlertDialog({
            title:'Text Fields',
            message:'You clicked the left button'
        }).show();
    });
    
    rightButton.addEventListener('click',function()
    {
        Titanium.UI.createAlertDialog({
            title:'Text Fields',
            message:'You clicked the right button'
        }).show();
    });
    
    
    var tf1 = Titanium.UI.createTextField({
        color:'#336699',
        height:35,
        top:100,
        left:10,
        width:250,
        borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
        leftButton:leftButton,
        rightButton:rightButton,
        leftButtonMode:Titanium.UI.INPUT_BUTTONMODE_ALWAYS,
        rightButtonMode:Titanium.UI.INPUT_BUTTONMODE_ONFOCUS
    });
    
win.add(tf1);
win.open();
4. No issue with buttons in a text field. 5. appc ti sdk select 5.1.X SDK. 6. run the same example code. 7. Issue with buttons in a text field occurs.

Result:

Buttons in a text field issue should occur with 5.1.X SDK builds.

Expected Result:

Left button should be centered and right button should become visible upon text field focus.

Attachments

FileDateSize
Screen Shot 2015-11-13 at 2.10.10 PM.png2015-11-13T22:43:07.000+00004441
Screen Shot 2015-11-13 at 2.13.56 PM.png2015-11-13T22:42:32.000+00003893

Comments

  1. Harry Bryant 2015-11-13

    Regression Issue
  2. Hans Knöchel 2015-11-14

    Marking as Invalid since it is a KitchenSink issue. As soon as we set a width and height as stated in the docs, everything works well.
  3. Lee Morris 2017-03-17

    Closing ticket as invalid.

JSON Source