Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

placeholderTextColor is ignored when secureTextEntry = {true} on TextInput #4476

Closed
dzunisanindlhovu opened this issue Apr 3, 2020 · 1 comment · Fixed by #4477
Closed
Assignees
Labels
Area: TextInput bug Partner: Xbox (label may be applied by bot based on author)
Milestone

Comments

@dzunisanindlhovu
Copy link
Contributor

dzunisanindlhovu commented Apr 3, 2020

Environment

If you are using latest version:

  1. react-native -v:
    react-native-cli: 2.0.1
    react-native: 0.61.52.
    react-native run-windows --info:

Otherwise if --info doesn't exist:

  1. react-native -v:
    react-native-cli: 2.0.1
    react-native: 0.61.52.
  2. npm ls rnpm-plugin-windows:
    `-- (empty)
  3. npm ls react-native-windows:
    `-- react-native-windows@0.61.0
  4. node -v:
    v12.10.0
  5. npm -v:
    6.10.3
  6. yarn --version:
    1.22.0

Then, specify:

10.0,18362.0

  • Target Platform Version(s):
    x64
  • Target Device(s):
    Windows 10 PC
  • Visual Studio Version:
    Visual Studio 2019
  • Build Configuration: Debug

Steps to Reproduce

(Write your steps here:)

On a high-level we need to be able to change the color of the placeholder text in TextInput on react-native-windows.

The placeholderTextColor works fine when the secureTextEntry = {false} but placeholderTextColor is ignored when secureTextEntry = {true} on TextInput.

This is partially because TextInput on react-native-windows uses winrt::Windows::UI::Xaml::Controls::TextBox when secureTextEntry = {false} and winrt::Windows::UI::Xaml::Controls::PasswordBox when secureTextEntry = {true}.

Even though we have the TextBox.PlaceholderForeground Property that we currently use to change the placeholder color, we actually don’t have anything equivalent for PasswordBox that we can just use straight away.

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

react-native run-windows --logging

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Additional context

(Write any other additional context that may help in root causing the issue.)

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Apr 3, 2020
@dzunisanindlhovu
Copy link
Contributor Author

This is the fix/workaround that we found in the Xbox partner team. https://github.com/microsoft/react-native-windows/pull/4477/files

@chrisglein chrisglein added Area: TextInput Partner: Xbox (label may be applied by bot based on author) and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Apr 6, 2020
@chrisglein chrisglein added this to the 0.62 (M5) milestone Apr 6, 2020
@ghost ghost closed this as completed in #4477 Apr 7, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: TextInput bug Partner: Xbox (label may be applied by bot based on author)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants