-
Notifications
You must be signed in to change notification settings - Fork 6k
Add new keyboard types and missing ios UITextContentType.newPassword #18202
Add new keyboard types and missing ios UITextContentType.newPassword #18202
Conversation
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'm glad we're supporting more keyboard types.
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. This all LGTM, but I will let someone who is more familiar with the engine to approve it.
| static UIKeyboardType ToUIKeyboardType(NSDictionary* type) { | ||
| NSString* inputType = type[@"name"]; | ||
| if ([inputType isEqualToString:@"TextInputType.text"]) | ||
| if ([inputType isEqualToString:@"TextInputType.address"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type of keyboard does not trigger address autofill (tested on iOS 13.5). Developers would have to use TextInputType.name instead to trigger address autofill, that seems really counterintuitive. But the TextInputType.name (UIKeyboardTypeNamePhonePad) keyboard doesn't have punctuation so it's not perfect for entering addresses.
Instead of returning UIKeyboardTypeNamePhonePad here, I feel it's better to document the behavior in the framework so developers know what keyboard type to use, if they value address autofill more than having punctuations on the keyboard.
* db82bfb Roll src/third_party/skia c74db7998b4e..518fd4d9d09d (1 commits) (flutter/engine#18278) * 4a1f9fa refactor the task_runner and task_runner_checker (flutter/engine#18238) * ccfec72 Fix grammar in FlBinaryCodec/FlStringCodec descriptions (flutter/engine#18268) * 044f254 Use the term 'handler' for registering callbacks. (flutter/engine#18269) * 8d76518 Fix latest_frame_target_time race (flutter/engine#18279) * 72a48bd Fix incorrect declaration of FlBinaryCodec (flutter/engine#18283) * cb6b620 Roll src/third_party/skia 518fd4d9d09d..dd1de25896e9 (2 commits) (flutter/engine#18282) * b1622c2 Roll src/third_party/dart 4e520824f502..2497606fed87 (11 commits) (flutter/engine#18284) * 2f6bcde Add FlStandardMessageCodec (flutter/engine#18213) * 4aa928d Roll src/fuchsia/sdk/mac from Hss3M... to gOhJW... (flutter/engine#18286) * a549e96 Roll src/fuchsia/sdk/linux from oDp5y... to TZN85... (flutter/engine#18287) * 8b49873 add new keyboard types and missing autofill hints (flutter/engine#18202) * 86462ee Roll src/third_party/dart 2497606fed87..c6db98667aa6 (4 commits) (flutter/engine#18289) * 624480f Roll src/third_party/skia dd1de25896e9..36bda05b2199 (1 commits) (flutter/engine#18291) * ea0a764 Roll src/third_party/skia 36bda05b2199..4e9cfe7691dd (4 commits) (flutter/engine#18292) * 7cf426e Roll src/third_party/dart c6db98667aa6..245a574301b1 (3 commits) (flutter/engine#18294) * 8d379e9 Roll src/third_party/skia 4e9cfe7691dd..3d2c41b773f6 (1 commits) (flutter/engine#18296) * f4220c2 Roll src/third_party/dart 245a574301b1..d5650235a249 (7 commits) (flutter/engine#18297) * 7eb6ffe [fuchsia] Disable failing physical shape layer tests (flutter/engine#18308) * 6689481 Temporarily disabling the fuchsia shell, runtime tests (flutter/engine#18319) * a6baef1 Disable flow tests on Fuchsia (flutter/engine#18323) * f6d3e7f Disable all fuchsia tests temporarily (flutter/engine#18326) * b59e3e9 Roll src/third_party/dart d5650235a249..2bf325900586 (35 commits) (flutter/engine#18327)
|
(combing through recent untested PRs) |
|
The MethodChannel takes a BinaryMessenger right. It should be mostly straightforward to give it a mock BinaryMessenger. Capture the argument instance when setMethodCallHandler is called on the mock and then invoke things on that MethodCallHandler instance directly. You don't even need access to the MethodCallHandler subclass implementation. |
Fixes flutter/flutter#41508
UIKeyboardTypeNamePhonePadseems to be required in order to trigger name/address autofill.