Skip to content

TextInput component with placeholderTextColor attribute appears to overlap cursor #27687

@lao9

Description

@lao9

Noticed in our application that the placeholder text appeared above the cursor:

Screen Shot 2020-01-03 at 6 48 14 PM

Occurs on both iOS and Android platforms.

Simply removing the placeholderTextColor attribute appears to fix the overlap:

Image from iOS

React Native version:

System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 1.21 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 29.0.2
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: link:../libraries/node_modules/react => 16.11.0
    react-native: ^0.61.5 => 0.61.5

Steps To Reproduce

  1. Create a TextInput
  2. Add a placeholderTextColor (in our case, the value was #CFCECE)

Describe what you expected to happen:

We expected the cursor to continue to appear over the placeholder text.

Snack, code example, screenshot, or link to a repository:

I tried to reproduce in this snack: https://snack.expo.io/B12ftrpkL

Unfortunately, not reproducible on iOS, however it seems to be an issue with or without the placeholderTextColor attribute on Android, so I'm not sure this simulator can be trusted for this specific issue. 😕

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugComponent: TextInputRelated to the TextInput component.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions