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.

(Android) textDecorationLine style doesn't update after removed in Text inside a Textinput

See original GitHub issue

After applying textDecorationLine style into a Text component that is inside a TextInput component, removing the style doesn’t remove the visual effect. This applies to underline and line-through or both.

<TextInput>
  <Text style={{textDecorationLine: 'line-through'}} />
</TextInput>

Environment

Environment:
  OS: macOS High Sierra 10.13.3
  Node: 9.3.0
  Yarn: 1.3.2
  npm: 5.6.0
  Watchman: 4.9.0
  Xcode: Xcode 9.2 Build version 9C40b
  Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
  react: 16.2.0 => 16.2.0
  react-native: 0.53.2 => 0.53.2

Expected Behavior

Removing the textDecorationLine style applied into the text should remove the text effect.

Actual Behavior

Apply textDecorationLine style, then remove it. The underline and line-through effects are still there.

Steps to Reproduce

https://snack.expo.io/Hkjuj2JYz

  1. Open the expo
  2. Press the buttons to toggle the styles to see the issue

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
react-native-botcommented, Mar 9, 2018

Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest stable release?

Thank you for your contributions.

How to ContributeWhat to Expect from Maintainers

1reaction
elliscwccommented, Mar 13, 2018

@react-native-bot could you update the labels? thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - How to hide underbar in EditText - Stack Overflow
The best answer, as ha1ogen says, is to make a custom drawable. Start with the 9-patch that is used for normal EditText fields....
Read more >
Text in Compose - Jetpack - Android Developers
The textAlign parameter allows to set the alignment of the text within a Text composable surface area. By default, Text will select the...
Read more >
text-decoration - CSS: Cascading Style Sheets - MDN Web Docs
This means that if an element specifies a text decoration, then a child element can't remove the decoration. For example, in the markup...
Read more >
Working with the EditText | CodePath Android Cliffnotes
The EditText is the standard text entry widget in Android apps. If the user needs to enter text into an app, this is...
Read more >
Text fields - Material Design
Note: The android:hint should always be set on the TextInputLayout instead of on the EditText in order to avoid unintended behaviors. Input text...
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