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

lineHeight style has no effect on multiline TextInput #25543

Closed
njdancer opened this issue Jul 8, 2019 · 5 comments
Closed

lineHeight style has no effect on multiline TextInput #25543

njdancer opened this issue Jul 8, 2019 · 5 comments
Labels
Bug Component: TextInput Related to the TextInput component. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@njdancer
Copy link

njdancer commented Jul 8, 2019

This appears to be the same issue reported in #14232.

When lineHeight is added to multiline TextInput's the height of the TextInput is initially effected however this disappears on first input at which point this appears to be ignored.

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

export default class App extends React.Component {
  render() {
    return (
      <View>
        <TextInput
          multiline
          style={{
            margin: 30,
            lineHeight: 100,
            borderColor: 'black',
            borderWidth: 1,
          }}
        />
      </View>
    );
  }
}

image

image

React Native version:
expo SDK 33.0 => RN 0.59.8

Steps To Reproduce

1.Render TextInput with multiline=true and style={ lineHeight: <Number> }

Describe what you expected to happen:
lineHeight should be applied to TextInput contents effectively allowing space to be applied between lines of text.

Snack, code example, or link to a repository:
https://snack.expo.io/@njdancer/b91e88

@njdancer njdancer added the Bug label Jul 8, 2019
@react-native-bot react-native-bot added the Component: TextInput Related to the TextInput component. label Jul 8, 2019
@holden-caulfield
Copy link

This is happening to me as well on iOS with RN 0.59.2

@likern
Copy link

likern commented Aug 25, 2019

Can confirm on RN version 60.

@AfrazHussain
Copy link

Still exists in RN v0.61. I have tried fixing this on my fork, but to no avail. Is anyone else willing to discuss this issue?

@stale
Copy link

stale bot commented Jan 4, 2020

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 4, 2020
@stale
Copy link

stale bot commented Jan 11, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Jan 11, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Jan 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants