Skip to content

[iOS][Editor] An Editor that has not enough height and resides inside a ScrollView/CollectionView will scroll the entire page #27750

@Vetle444

Description

@Vetle444

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

  1. Clone: https://github.com/Vetle444/MauiTestApp/tree/main
  2. Start app
  3. Click on the button: 'TopOfPageScrollDownEditorFocus'
  4. Tap either Editor's
  5. 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);

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-editorEditori/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationregressed-in-9.0.0s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions