(Android) textDecorationLine style doesn't update after removed in Text inside a Textinput
See original GitHub issueAfter 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
- Open the expo
- Press the buttons to toggle the styles to see the issue
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 Contribute • What to Expect from Maintainers
@react-native-bot could you update the labels? thanks!