You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TextInput Alignment does not work on iOS 11 #16341
Environment:
OS: macOS Sierra 10.12.6
Node: 7.7.2
Yarn: Not Found
npm: 5.4.2
Watchman: 4.7.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: Not Found
In the constructor we are just setting the initial state. All that this.state = { text: 'Alignment', alignText: 'right'}; does is setting the initial alignment of the text to the right. It makes no difference to the issue.
The TextInput is re-rendered when the value changes, not when the style. In your example if you focus on the TextInput or change to this value={this.state.alignText}, it works.
@gusgard Thank you for your input. I understand that the TextInput is re-rendered when the value changes, not when the style.
The issue I am talking about here is that re-rendering is not required on iOS 10. In the gif above, as shown, with the same code, it works as expected on iOS 10 (right simulator) but not on iOS 11 (left simulator).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
Activity
[-]TextInput Alignment does not work on iOS11[/-][+]TextInput Alignment does not work on iOS 11[/+]gusgard commentedon Oct 12, 2017
Could you try
this.state = { text: 'Alignment', alignText: 'right'};in the constructor ?n-kumari commentedon Oct 12, 2017
In the constructor we are just setting the initial state. All that
this.state = { text: 'Alignment', alignText: 'right'};does is setting the initial alignment of the text to the right. It makes no difference to the issue.gusgard commentedon Oct 13, 2017
The
TextInputis re-rendered when the value changes, not when the style. In your example if you focus on the TextInput or change to thisvalue={this.state.alignText}, it works.n-kumari commentedon Oct 13, 2017
@gusgard Thank you for your input. I understand that the
TextInputis re-rendered when the value changes, not when the style.The issue I am talking about here is that re-rendering is not required on iOS 10. In the gif above, as shown, with the same code, it works as expected on iOS 10 (right simulator) but not on iOS 11 (left simulator).
fmanns commentedon Oct 20, 2017
This appears to be an IOS 11 bug. I was able to reproduce it in a simple standalone app.
stale commentedon Dec 19, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.