Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1847] iOS: Clear button does not show when paddingRight is used in text field

GitHub Issuen/a
TypeBug
PriorityLow
StatusResolved
ResolutionCannot Reproduce
Resolution Date2019-10-31T18:01:33.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelsapi
Reporterctredway
AssigneeIngo Muschenetz
Created2011-04-15T03:03:49.000+0000
Updated2019-10-31T18:01:34.000+0000

Description

Code below shows this. Happens on iPhone and iPad:

var win = Ti.UI.currentWindow;
var input1 = Ti.UI.createTextField({

hintText:'e.g. 30000  ',
height:35,
width:120,
borderColor:'#000',

// COMMENT OUT THIS LINE AND THE CLEAR BUTTON WILL SHOW

paddingRight:5,

//END

textAlign: 'right',
font:{fontSize:15},
color:'#000',
returnKeyType:Titanium.UI.RETURNKEY_DONE,
clearButtonMode:Titanium.UI.INPUT_BUTTONMODE_ONFOCUS,
keyboardType:Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION

}); win.add(input1);

Comments

  1. Vishal Duggal 2012-07-20

    Still valid. Tested on latest master v2.2.0
  2. Stephen Tramer 2012-07-26

    Already tested by Vishal and confirmed. Missed 'clear button' setting.
  3. Joseph Sachs 2013-07-01

    Issue still valid. Having set of TextField:
       var searchBar = Ti.UI.createTextField({
            height : 45, top : 0, width : 240, 
            hintText : prompt, font:{fontSize:14}, 
            paddingLeft: 12,                  // padding left works
            keyboardType : Ti.UI.KEYBOARD_DEFAULT, autocapitalization:true, autocorrect:false,
            returnKeyType : Ti.UI.RETURNKEY_DEFAULT, borderStyle : Ti.UI.INPUT_BORDERSTYLE_NONE,
            clearButtonMode: Ti.UI.INPUT_BUTTONMODE_ONFOCUS, 
            paddingRight: 30,                 // padding right removes the clearButton
            backgroundImage:'/images/fieldTextBox.png',
       });
       
  4. Alan Hutton 2019-10-31

    Axway Appcelerator Studio, build: 5.1.4.201909061933  macOS : 10.15 Node.js Version : 8.9.1 npm Version : 5.5.1 Appcelerator CLI : 7.1.1 Titanium CLI CLI Version : 5.2.1 node-appc Version : 0.2.49 Titanium SDKs : 8.2.1.GA

JSON Source