Editor Scaling creating new lines on older iOS versions #25581
Labels
area-controls-editor
Editor
platform/iOS 🍎
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
The issue is when an editor is scaled down on older iOS versions, the text splits in the middle and moves on to the next line causing text to seem to disappear.
This issue was believed to be fixed with: #24859.
Removing the call to SizeThatFits seemed to not cause this scaling issue but it turns out this is only on iOS 17 and up.
On iOS 15.5, the bad editor scaling behavior is still present and on iOS 16.4, it seems that there is still slightly different, but wrong behavior.
Some things I've tried
Inside the MauiTextView.LayoutSubviews method, I am setting a breakpoint and scaling down the editor by 0.5 and then scaling it back up to 1.0. It appears that there are two passes in the LayoutSubviews call and I capture the Bounds and ContentSize. The first image below shows iOS 17.0 and the second shows iOS 15.5. You'll even see when the editor on iOS 15.5 is at the full scale and appears on one line, it still has a much larger ContentSize.Height than the iOS 17.0 equivalent.
Steps to Reproduce
By adding the following code and then sliding the slider value, you'll see the editor will split the text into two lines on iOS 15.5 but not iOS 17+
Link to public reproduction project repository
No response
Version with bug
8.0.92 SR9.2
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15.5 - iOS 16.4
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: