-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
WordWrap on labels with padding does not work properly on iOS. #16018
Comments
As far as I know, this issue also occurs in Xamarin.Forms and is still an open issue. |
By fixing the implementation of MauiLabel, WordWrap now works as intended in the case of adding padding. [src\Core\src\Platform\iOS\MauiLabel.cs] The following is the verification result of the fixed version. This is the verification result for the layout iPhone.14.iOS.16.4.2023-07-13.10-28-49.mp4The character string is wrapped and displayed without disappearing near the display width. I then tested it with the following layout.
iPhone.14.iOS.16.4.2023-07-13.10-43-27.mp4
iPhone.14.iOS.16.4.2023-07-13.10-45-39.mp4
iPhone.14.iOS.16.4.2023-07-13.10-48-30.mp4
iPhone.14.iOS.16.4.2023-07-13.10-50-30.mp4
iPhone.14.iOS.16.4.2023-07-13.10-51-29.mp4
iPhone.14.iOS.16.4.2023-07-13.10-53-05.mp4
iPhone.14.iOS.16.4.2023-07-13.10-53-59.mp4
iPhone.14.iOS.16.4.2023-07-13.10-58-18.mp4
iPhone.14.iOS.16.4.2023-07-13.10-59-26.mp4At least the above test results match my expectations. |
|
This is also happening on MacCatalyst! |
Description
To reproduce the problem, the layout is as follows.
The implementation of TextChanged event of Entry is as follows.
If Padding is set for Label and WordWrap is specified for LineBreakMode, the Text of Label will not be
wrapped by the amount specified for padding.
Below is the execution result.
iPhone.14.iOS.16.4.2023-07-06.15-48-32.mp4
"1234567890ABCDEFG" is displayed, but "HIJKL" after that is not displayed without being wrapped.
It wraps when you type 'M'.
Steps to Reproduce
The steps to reproduce are as follows.
When the Label text reaches the end of one line in step 2, the character string entered after
that is not wrapped by the amount specified for padding and is not displayed.
I was expecting the Label's Text to wrap when it reaches the end of a line.
Link to public reproduction project repository
https://github.com/cat0363/Maui-IssueLabel.git
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 16.4
Did you find any workaround?
Set Margin instead of Padding for Label.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: