fix(android): add TYPE_CLASS_TEXT to email/url/password input types#656
Open
hggzm wants to merge 1 commit intomicrosoft:mainfrom
Open
fix(android): add TYPE_CLASS_TEXT to email/url/password input types#656hggzm wants to merge 1 commit intomicrosoft:mainfrom
hggzm wants to merge 1 commit intomicrosoft:mainfrom
Conversation
TYPE_TEXT_VARIATION_EMAIL_ADDRESS, TYPE_TEXT_VARIATION_URI, and TYPE_TEXT_VARIATION_PASSWORD are variation flags that must be combined with TYPE_CLASS_TEXT to properly configure the keyboard and enable TalkBack to announce the input type (e.g. 'email address'). Without TYPE_CLASS_TEXT, Android treats the input type as numeric class (0), resulting in wrong keyboard and no format hint. Fixes microsoft#107
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork-based PR (no Azure Pipelines CI). When ready for CI, push branch to upstream as
users/hggzm/clean/fix-email-inputtype-107and recreate.History: upstream PRs #625 (closed)
Summary
When a
TextInputhasstyle: "Email","Url", or"Password", theEditTextwas configured with only the variation flag (e.g.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) without combining it withTYPE_CLASS_TEXT. Android'sInputTyperequires variation flags to be OR'd with their base class to function correctly.Without
TYPE_CLASS_TEXT, the input type defaults toTYPE_CLASS_NUMBER(0), which:Changes
TYPE_CLASS_TEXTwithTYPE_TEXT_VARIATION_EMAIL_ADDRESS,TYPE_TEXT_VARIATION_URI, andTYPE_TEXT_VARIATION_PASSWORDusing bitwise ORBefore
After
Testing
style: "Email"