react-native: lineHeight styling doesn't impact multiline TextInput

Description

lineHeight styling doesn’t impact TextInput when multiline is set to true

Reproduction Steps and Sample Code

kapture 2017-05-28 at 1 48 28

<TextInput
    multiline={true}
    style={{
        lineHeight: fontLineHeight,
    }}
/>

Additional Information

  • React Native version: 0.44.0
  • Platform: iOS (didn’t test on Android)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I still plan to fix this. 😄

Are you sure this is fixed? Getting this using 0.57 and iOS:

photo_2018-11-18_02-38-24

  storyText: {
    fontSize: 18,
    marginTop: 18,
    fontFamily: 'noto-sans',
    color: '#444',
    lineHeight: 1000,
    textAlign: 'left',
    backgroundColor: '#fff',
  },
        <TextInput
          style={styles.storyText}
          multiline={true}
          keyboardType="default"
          placeholder="Your Message"
        />

Fixed in master.

@shergin Still seems not fixed for 0.53, correct me if I’m using it wrong

screenshot: simulator screen shot - iphone 6 - 2018-02-08 at 16 43 38

code:

      <View style={styles.container}>
        <Text
          style={{
            lineHeight: 40,
            borderWidth: 1,
            marginBottom: 10
          }}
        >Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!</Text>
        <TextInput multiline placeholder='placeholder'
          style={{
            lineHeight: 40,
            borderWidth: 1,
            width: width - 10,
            backgroundColor: 'pink'
          }}
        />
      </View>

Issue persists on RN 0.57.7