-
Notifications
You must be signed in to change notification settings - Fork 6k
[Android text input] fix android autofill on focused text field #24463
[Android text input] fix android autofill on focused text field #24463
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 👍
| } | ||
|
|
||
| // Called by the text input channel to update the text input plugin with the | ||
| // latest TextEditState from the framework. |
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.
Nit: TextEditState => TextEditingState
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.
The class that this method takes as a parameter is called TextEditState.
|
|
||
| // The autofill value of the focused field is sent via updateEditingState. | ||
| verify(textInputChannel, times(1)) | ||
| .updateEditingState(anyInt(), eq("focused field"), eq(13), eq(13), eq(-1), eq(-1)); |
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.
Where do the 13s come from?
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.
"focused field".length == 13, the autofill implementation puts the caret at the end.
Fixes flutter/flutter#75833
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.