diff --git a/capability/editing/KeyboardTypeMapper.h b/capability/editing/KeyboardTypeMapper.h index b8304c6c8d97a5898df6af491e0f0daefa150d61..835582a18cfc0c0ed12cda3ec46af38ded657f0f 100644 --- a/capability/editing/KeyboardTypeMapper.h +++ b/capability/editing/KeyboardTypeMapper.h @@ -18,6 +18,7 @@ FOUNDATION_EXPORT NSString *const TextInputTypePhone; FOUNDATION_EXPORT NSString *const TextInputTypeEmailAddress; FOUNDATION_EXPORT NSString *const TextInputTypeURL; FOUNDATION_EXPORT NSString *const TextInputTypeVisiblePassword; +FOUNDATION_EXPORT NSString *const TextInputTypeNumberPassword; // TextCapitalization FOUNDATION_EXPORT NSString *const TextCapitalizationCharacters; diff --git a/capability/editing/KeyboardTypeMapper.m b/capability/editing/KeyboardTypeMapper.m index 34af8431d229c49f150d42c7230a5c85c076ec44..fcf107eb1e98b076493f7c58b8b3486ef3705048 100644 --- a/capability/editing/KeyboardTypeMapper.m +++ b/capability/editing/KeyboardTypeMapper.m @@ -13,6 +13,7 @@ NSString *const TextInputTypePhone = @"TextInputType.phone"; NSString *const TextInputTypeEmailAddress = @"TextInputType.emailAddress"; NSString *const TextInputTypeURL = @"TextInputType.url"; NSString *const TextInputTypeVisiblePassword = @"TextInputType.visiblePassword"; +NSString *const TextInputTypeNumberPassword = @"TextInputType.NUMBER_PASSWORD"; // TextCapitalization NSString *const TextCapitalizationCharacters = @"TextCapitalization.characters"; @@ -42,7 +43,8 @@ NSString *const TextInputActionNewline = @"TextInputAction.newline"; TextInputTypeNumber: @(UIKeyboardTypeNumberPad), TextInputTypePhone: @(UIKeyboardTypePhonePad), TextInputTypeEmailAddress: @(UIKeyboardTypeEmailAddress), - TextInputTypeURL: @(UIKeyboardTypeURL) + TextInputTypeURL: @(UIKeyboardTypeURL), + TextInputTypeNumberPassword: @(UIKeyboardTypeNumberPad) }; } diff --git a/capability/editing/text_input_connection_impl.mm b/capability/editing/text_input_connection_impl.mm index 3ee75d4072e6018e5d82c12699d3c6b84bade881..1604f55764fbabe0cb531546c02cfe61dbe90048 100755 --- a/capability/editing/text_input_connection_impl.mm +++ b/capability/editing/text_input_connection_impl.mm @@ -81,6 +81,9 @@ void TextInputConnectionImpl::Show(bool isFocusViewChanged, int32_t instanceId){ }else if(inputType == TextInputType::VISIBLE_PASSWORD){ inputTypeName = TextInputTypeVisiblePassword; obscureText = 1; + }else if(inputType == TextInputType::NUMBER_PASSWORD){ + inputTypeName = TextInputTypeNumberPassword; + obscureText = 1; } NSString* inputFilter = [NSString stringWithFormat:@"%s", config_.inputFilter.c_str()];