Skip to content

TextInput color issue in full screen editing #16516

@hoscarcito

Description

@hoscarcito

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13
Node: 8.7.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3

Target Platform: Android 7.1.1

Steps to Reproduce

  1. Create a TextInput with text color white
  2. Rotate phone to use full keyboard

Expected Behavior

The text color should change to black (or similar) in order to be visible on full keyboard layout.

Actual Behavior

If you have set a dark color for the background and your TextInput has a bright color, when you rotate to use the full keyboard layout, the android text input has a white background, but the text color stills bright.

Portrait mode:
portraitMode

Landscape Mode:
landscapeMode

P.S. The images are from a StackOverflow post which had no answers.

Reproducible Demo

import React from 'react';
import {
  StyleSheet,
  TextInput,
  View,
} from 'react-native';

const black = 'rgb(53, 52, 53)';
const white = 'rgb(244, 243, 243)';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: black,
  },
  TextInputStyle: {
    color: white,
  },
});

export default () => (
  <View style={styles.container}>
    <TextInput
      placeholder="Placeholder"
      placeholderTextColor="white"
      style={styles.TextInputStyle}
    />
  </View>
);

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