Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1426] Alloy: Textfield keyboardType shorthands do not work in TSS

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2014-07-30T16:38:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Titanium SDK & CLI
Labelsapi, ios, regression
ReporterDavid He
AssigneeSteven Scott
Created2014-07-29T12:19:34.000+0000
Updated2016-03-08T07:37:51.000+0000

Description

Run the code below and focus on textfield, the keyboard bringing up is not what I ask - a email keyboard....
$.index.open();
"#input":{
	right: 10,
	width: 120,
	top: 50,
	clearButtonMode: 1,
	borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
	textAlign: 'right',
	color: 'red',
	minimumFontSize: 8,
	height: 30,
	font: {
		fontSize: 16,
		fontFamily: 'Arial',
		fontWeight: 'normal'
	},
	keyboardType:"KEYBOARD_EMAIL" //NOT WORK
} 
<Alloy>
    <Window backgroundColor="white">
    	<TextField id="input" />
    </Window>
</Alloy>
A side note, use the full name like Ti.UI.KEYBOARD_EMAIL works though. It is a new feature since 1.4.0 but never try this on that version, fails on 1.4.1 A regression?

Comments

  1. Ingo Muschenetz 2014-07-29

    [~skypanther] FYI
  2. Tim Poulsen 2014-07-30

    The correct abbreviation to use is EMAIL (or email) not KEYBOARD_EMAIL. In my tests, using EMAIL works as expected. I checked [the docs](http://docs.appcelerator.com/titanium/latest/#!/guide/Alloy_XML_Markup-section-35621528_AlloyXMLMarkup-TextFieldKeyboardShorthands) and the release notes and at least in those two places we've documented this feature correctly. If you found another source that indicates you should be using the KEYBOARD_ portion, please add a comment and we'll reopen this as a docs ticket.

JSON Source