question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TextInput wraps text instead of showing ellipsis

See original GitHub issue

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
      Memory: 369.40 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.12.0 - /usr/local/opt/node@8/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/opt/node@8/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        Build Tools: 23.0.1, 25.0.3, 26.0.2, 27.0.1, 27.0.3, 28.0.2, 28.0.3
        API Levels: 23, 24, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      @types/react: ^16.4.18 => 16.4.18 
      @types/react-native: 0.57.3 => 0.57.3 
      react: ^16.5.0 => 16.5.0 
      react-native: 0.57.3 => 0.57.3 
    npmGlobalPackages:
      react-native-git-upgrade: 0.2.7

Description

When a user types directly into a TextInput and overflows the width, then blurs, the content wraps instead of an ellipsis being added. Content is ellipsisized correctly if it’s set programatically. Adding vertical padding can hide the wrapping content, but the ellipsis is still missing.

In the screenshots (and demo) the first input has numberOfLines={1}, the second doesn’t, the third has paddingVertical: 0, the fourth has paddingVertical: 20.

1 2 3 4
img_0162 img_0163 img_0164 img_0165

Reproducible Demo

https://snack.expo.io/@apexskier/text-wrapping

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
bormcommented, Jul 30, 2019

"react-native": "0.59.9" keyboardType="email-address"

Still reproduce

2reactions
christopher-18commented, May 30, 2019

This issue still persists in android for rn version 0.59

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextInput with TextAlign on iOS does not add ... - Stack Overflow
Android app works in a different way: It never shows ellipsis but if you type a long string it always shows the end...
Read more >
Text in Compose - Jetpack - Android Developers
Text is a central piece of any UI, and Jetpack Compose makes it easier to display or write text. Compose leverages composition of...
Read more >
Need help with CSS in a Listview nowrap - Mendix Forum
Hi all, Ina listview I have a textbox and it looks like this: The text expanse the line height of the list view...
Read more >
How to Wrap Text on Overflow in Flutter (Code + 2022 Ready)
Showing the clipped text on the screen is not a good idea. You never know what meaning a half text will convey Instead,...
Read more >
CSS3 Text Overflow – A Way To Wrap Text - CSS Mine
However, the catch when using the ellipsis value is that it will apply to any single line of text in block elements and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found