Skip to content

Using toUpperCase or textTransform: 'uppercase' breaks on an Android controlled TextInputΒ #27449

Open
fabOnReact/react-native-improved
#16
@nick-michael

Description

@nick-michael

React Native version: 0.61.4 and lower

Trying to force capitalization of characters inside a TextInput is broken on Android.

  • autoCapitalize="characters" doesn't seem to do anything
  • Using toUpperCase in the onChangeText hook causes duplication of letters
  • Using textTransform: 'uppercase' in styles block causes the same duplication of letters
  • Using textTransform: 'uppercase' in a non-controlled TextInput does nothing

Steps To Reproduce

  1. Create a controlled TextInput and either use onTextChanged to modify the text to uppercase or use text transform in the styles block
  2. Type multiple lowercase characters into the text box

Describe what you expected to happen:
Characters should be capitalized

What actually happens:
Characters are capitalized and duplicated

Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@nmi09/rn-android-capitalize-input-bug

ezgif com-video-to-gif

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions