-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
Hello, we made this Component back in 2023. In this component we have an Editor, where we had to turn off Apple's default padding of UITextView. Now we have discovered that putting this component inside a CollectionView or a ScrollView, and the user taps to get focus of the Editor, the whole page scrolls. We discovered that the cause of this is because we set the UITextView's TextContainerInset to UIEdgeInsets.Zero.
This can also be reproduced by setting the Editor's HeightRequest to 25:
<ScrollView>
<Grid RowDefinitions="Auto, Auto, Auto"
RowSpacing="4">
<BoxView HeightRequest="50"
BackgroundColor="Red"/>
<Editor Placeholder="This has its HeightRequest set to 25"
MinimumHeightRequest="-1"
HeightRequest="25"
BackgroundColor="Blue"
Grid.Row="2" />
</Grid>
</ScrollView>
This is not really a huge problem for us, but posting here so this can possibly highlight a bigger issue.
Steps to Reproduce
- Clone: https://github.com/Vetle444/MauiTestApp/tree/main
- Start app
- Click on the button: 'TopOfPageScrollDownEditorFocus'
- Tap either Editor's
- Observe that the whole page scrolls down
Link to public reproduction project repository
https://github.com/Vetle444/MauiTestApp/tree/main
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS > 17.5, probably earlier versions also
Did you find any workaround?
Setting TextContainerInset = new UIEdgeInsets(1f, 0f, 1f, 0f);