-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
textInput props textAlign will cause long text to be cut off after the hyphen when out of focus and focus again #44107
Comments
@LayMui Can you please verify this on latest RN version: |
I am debugging this from a while and found out that this isn't specific to just So what happens here is paragraphStyle will apply a default Possible Solution:
Attaching file reference(Issue happening on old and new both): Line 208 in 91ecd7e
Old Arch:
@cortinico If you think this is the correct way then I can pick it up. |
@cortinico Can you look into this once. |
We're currently hyperfocused on New Architecture bugs only at the moment as that's our P0 priority. As this is not a New Architecture bug, we can't sadly invest time on this one at the moment. If you wish to send a PR with the change you suggested @shubhamguptadream11 please do. I can't promise it will be merged/reviewed in a timely manner at the moment, sorry for that. |
@cortinico This is happening on new architecture as well. So in order to solve this issue I am thinking of exposing |
I understand, but is not a New Architecture regression. |
@cortinico I had raised a PR here: #45968 |
Summary: Solves this issue: #44107 ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [ADDED] - Line break mode for TextInput components. **This includes cpp changes and new functions.** This PR is a breakdown of [this](#45968) PR. Pull Request resolved: #46130 Test Plan: - Tested builds in new and old architecture mode. Reviewed By: andrewdacenko Differential Revision: D61656894 Pulled By: cipolleschi fbshipit-source-id: 9a25387cb27cded072e76575e6d2fca01963c621
…ons (#46129) Summary: Solves this issue: #44107 ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [ADDED] - Line break mode for TextInput components. **This includes iOS updates to consume new cpp functions.** This PR is a breakdown of [this](#45968) PR. Pull Request resolved: #46129 Test Plan: - Tested builds in new and old architecture mode. Reviewed By: andrewdacenko Differential Revision: D61656969 Pulled By: cipolleschi fbshipit-source-id: 4c6ed983ad15841ce52443bba13962d45c04e756
Summary: Solves this issue: #44107 ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [ADDED] - Line break mode for TextInput components. **This includes JS APIs for the new mode.** This PR is a breakdown of [this](#45968) PR. Pull Request resolved: #46128 Test Plan: - Added unit tests to cover the new JS APIs. - Verified that the new mode functions as expected through manual testing. Reviewed By: andrewdacenko Differential Revision: D61657004 Pulled By: cipolleschi fbshipit-source-id: 9fc5c40fc077bee8e1abc51b6eae2e0f0fcd9b8f
Fixed PR had been merged. Closing this issue. |
Description
textInput: When I type a very long text with a hyphen and the text exceed the view of the textInput and when I go out of focus and enter into focus again, the text after the hyphen will get cut off.
this happen for the css style textAlign props
code snippet:
<TextInput
style={styles.input}
textAlign={'left'}
/>
the above issue happen for all left, right and center
const styles = StyleSheet.create({
input: {
height: 40,
margin: 12,
borderWidth: 1,
padding: 10,
},
..
Steps to reproduce
create the RN app
add the code snippet to the App.tsx
import {
TextInput
} from 'react-native';
<TextInput
style={styles.input}
textAlign={'center'}
/>
React Native Version
0.73.6
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/LayMui/textInput
Screenshots and Videos
The text was updated successfully, but these errors were encountered: