Skip to content

[Android][TextInput] Bug when combine secureTextEntry + keyboardType props #26799

Closed

Description

@retyui

React Native version:

System:
    OS: Linux 4.15 Linux Mint 19.1 (Tessa)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 5.34 GB / 15.51 GB
    Shell: 2.7.1 - /usr/bin/fish
  Binaries:
    Node: 10.16.3 - /usr/bin/node
    Yarn: 1.17.3 - ~/.yarn/bin/yarn
    npm: 6.11.3 - /usr/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.2 => 0.61.2 
  npmGlobalPackages:
    create-react-native-web-app: 0.1.14
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2

Steps To Reproduce

  1. Just use secureTextEntry + keyboardType
<TextInput secureTextEntry keyboardType="email-address"/>
<TextInput secureTextEntry keyboardType="phone-pad"/>
  1. Now you will see that on Android when keyboardType is email-address or phone-pad value visible for users.

image

image

Describe what you expected to happen:

Should work the same as iOS

Snack & code example:

https://snack.expo.io/@retyui/2793f1

Links

Activity

  1. changed the title [-][Android][TextInput] Combine props bug secureTextEntry + keyboardType[/-] [+][Android][TextInput] Bug when combine secureTextEntry + keyboardType props[/+] on Oct 10, 2019
  2. stale commented on Jan 8, 2020

    @stale

    Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

  3. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jan 8, 2020
  4. stale commented on Apr 7, 2020

    @stale

    Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

  5. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Apr 7, 2020
  6. stale commented on Jul 6, 2020

    @stale

    Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

  7. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jul 6, 2020
  8. 8 remaining items

  9. github-actions commented on May 19, 2023

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  10. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on May 19, 2023
  11. retyui commented on May 19, 2023

    @retyui
    ContributorAuthor

    any progress?

  12. removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on May 20, 2023
  13. NishitTibicle commented on Jul 24, 2023

    @NishitTibicle

    Come on guys ? this is not working in android do something for it

  14. github-actions commented on Jul 24, 2023

    @github-actions
  15. added
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    on Jul 24, 2023
  16. github-actions commented on Jan 22, 2024

    @github-actions

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  17. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jan 22, 2024
  18. added
    Never gets stalePrevent those issues and PRs from getting stale
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Jan 22, 2024
  19. shubhamguptadream11 commented on Sep 9, 2024

    @shubhamguptadream11
    Contributor

    Hi @retyui,
    After looking into the issue, it appears that the inability to mask text input when using keyboardType="phone-pad" with secureTextEntry is the default behavior on Android. The InputType.TYPE_CLASS_PHONE does not support secure text masking [here], which is why the text remains visible. This is the expected behavior on Android and not specific to React Native.

  20. added
    Resolution: AnsweredWhen the issue is resolved with a simple answer
    and removed
    Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.
    on Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions