Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27870] Android: KEYBOARD_TYPE_NUMBERS_PUNCTUATION should allow all chars except emoji like iOS

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2020-08-11T14:53:23.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.1.0
ComponentsAndroid
LabelsTextArea, TextField, android, emoji, keyboardType, parity
ReporterJoshua Quick
AssigneeJoshua Quick
Created2020-04-28T01:09:44.000+0000
Updated2020-08-11T14:53:23.000+0000

Description

*Summary:* On iOS, KEYBOARD_TYPE_NUMBERS_PUNCTUATION allows all characters to be entered such as letters (all languages), numbers, and symbols... but not emoji. The only difference between this keyboard type and KEYBOARD_TYPE_ASCII is that iOS shows the "Numbers and Punctuations" keyboard layout by default when shown, but still allows the end-user to switch keyboards if they wish. On Android, this keyboard type won't let the end-user enter any letters/symbols from any language. It will automatically filter them out when the end-user attempts to enter them. This keyboard type should be changed to match iOS' behavior. *Test Code:*
var window = Ti.UI.createWindow();
window.add(Ti.UI.createTextField({
	keyboardType: Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION,
	width: "90%",
}));
window.open();
*Note 1:* The iOS UIKeyboardTypeNumbersAndPunctuation and UIKeyboardTypeASCIICapable types are commonly used to display keyboards without emoji. This is the most important detail we need to replicate on Android. *Note 2:* Android does not have an API which lets us display the numbers side of the keyboard by default when using a normal text keyboard. So, this is something we can't replicate from iOS.

Comments

  1. Joshua Quick 2020-04-28

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/11662
  2. Samir Mohammed 2020-07-13

    FR Passed, Waiting on Jenkins build.
  3. Christopher Williams 2020-07-14

    merged to master for 9.1.0 target
  4. Samir Mohammed 2020-08-11

    *Closing ticket*. Improvement verified in SDK version 9.1.0.v20200810120239. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/11662

JSON Source