Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,16 @@ public enum KeyboardType {
/**
* A numeric keypad that outputs only ASCII digits
*/
ASCII_NUMBER_PAD(11);
ASCII_NUMBER_PAD(11),

/**
* A text keyboard with autocorrection, suggestions and predictive text
* disabled. Useful for fields that should accept raw user input
* (identifiers, codes, tokens, login input).
*
* <p>On iOS this value fall back to an ASCII-capable keyboard.</p>
Comment thread
jperedadnr marked this conversation as resolved.
Outdated
*/
TEXT_NO_SUGGESTIONS(12);
Comment on lines +104 to +111

private final int value;

Expand Down
4 changes: 4 additions & 0 deletions modules/keyboard/src/main/native/ios/Keyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ static void reloadKeyboard() {
}

void setGlassKeyboardType(int type) {
// fall back to an ASCII-capable keyboard as TEXT_NO_SUGGESTIONS = 12 has no iOS equivalent
if (type < 0 || type > 11) {
type = (int)UIKeyboardTypeASCIICapable;
}
Comment thread
jperedadnr marked this conversation as resolved.
Outdated
currentKeyboardType = (UIKeyboardType)type;
ensureSwizzled();
AttachLog(@"Keyboard type set to %d", type);
Expand Down
Loading