Skip to content
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

[iOS][Editor] Editor that gets focus will scroll the text content inside the Editor, when it resides inside a CollectionView that has a Footer #27766

Open
Vetle444 opened this issue Feb 13, 2025 · 1 comment
Labels

Comments

@Vetle444
Copy link

Vetle444 commented Feb 13, 2025

Description

Putting an Editor inside CollectionView.ItemTemplate while having a footer in the CollectionView, will scroll the content inside Editor when tapping to get focus on it. However, ONLY if the CollectionView has a footer.

<CollectionView>
        <CollectionView.ItemsSource>
            <Array Type="{x:Type x:String}">
                <x:String>Test 1</x:String>
                <x:String>Test 2</x:String>
                <x:String>Test 3</x:String>
                <x:String>Test 4</x:String>
                <x:String>Test 5</x:String>
                <x:String>Test 6</x:String>
                <x:String>Test 7</x:String>
                <x:String>Test 8</x:String>
                <x:String>Test 9</x:String>
                <x:String>Test 10</x:String>
                <x:String>Test 11</x:String>
                <x:String>Test 12</x:String>
                <x:String>Test 13</x:String>
            </Array>
        </CollectionView.ItemsSource>
        
        <CollectionView.ItemTemplate>
            <DataTemplate>
                    <Editor Text="{Binding .}"/>
            </DataTemplate>
        </CollectionView.ItemTemplate>
        
        <CollectionView.FooterTemplate>
            <DataTemplate>
                <BoxView HeightRequest="100"
                         BackgroundColor="Blue"/>
            </DataTemplate>
        </CollectionView.FooterTemplate>
        
    </CollectionView>

Image

Steps to Reproduce

  1. Clone: https://github.com/Vetle444/MauiTestApp/tree/editorScrollInCollectionView
  2. Make sure to be on branch: editorScrollInCollectionView
  3. Run app
  4. Tap on "Test" button
  5. Try to tap on any editor
  6. Observe that the text inside editor scrolls upwards, out of sight
  7. If you remove the Footer of the CollectionView, it works correctly

Link to public reproduction project repository

https://github.com/Vetle444/MauiTestApp/tree/editorScrollInCollectionView

Version with bug

9.0.10 SR1 and later. Haven't tested .NET 8

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 and later, haven't tested others

Did you find any workaround?

Removing Footer, and having a Grid as root, placing a 'footer' with VerticalOptions=End, and CollectionView with VerticalOptions=Fill

Relevant log output

@Vetle444 Vetle444 added the t/bug Something isn't working label Feb 13, 2025
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants