[AC-1426] Alloy: Textfield keyboardType shorthands do not work in TSS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2014-07-30T16:38:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy, Titanium SDK & CLI |
Labels | api, ios, regression |
Reporter | David He |
Assignee | Steven Scott |
Created | 2014-07-29T12:19:34.000+0000 |
Updated | 2016-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?
[~skypanther] FYI
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.