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

HybridWebView not displayed when inside the header of a CollectionView in iOS #28426

Open
acaliaro opened this issue Mar 15, 2025 · 5 comments
Open
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@acaliaro
Copy link

Description

When a hybridwebview is placed inside a CollectionView header, the hybridwebview is not displayed. If placed outside the collectionview, it is displayed correctly.

Steps to Reproduce

Run the attached project, open the flyout menu and select the "Home" item

Problem also with 9.0.40

Link to public reproduction project repository

https://github.com/acaliaro/MauiCollectionViewHeaderProblemWithHWW

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 18.2.1 iPhone 12

Did you find any workaround?

No response

Relevant log output

@acaliaro acaliaro added the t/bug Something isn't working label Mar 15, 2025
@kubaflo
Copy link
Contributor

kubaflo commented Mar 15, 2025

Hi! When I explicitly set HeightRequest in your repro it works:

  <CollectionView Grid.Row="0">
            <CollectionView.Header>
                <Grid ColumnDefinitions="*" RowDefinitions="*, Auto" BackgroundColor="Red">
                    <HybridWebView
                        x:Name="WebContent1"
                        Grid.Row="0"
                        HeightRequest="200"
                        DefaultFile="index.html"
                        RawMessageReceived="HybridWebView_RawMessageReceived" />
                    <Label Grid.Row="1" Text="This is the header but HybridWebView is not show on iOS" />
                </Grid>
            </CollectionView.Header>
            <CollectionView.EmptyView>
                <Label Text="Empty"/>
            </CollectionView.EmptyView>
        </CollectionView>

Image

@acaliaro
Copy link
Author

Thanks @kubaflo but do I have to set the height? I think it should take the height like on android

@kubaflo
Copy link
Contributor

kubaflo commented Mar 16, 2025

I'm not sure, but maybe this is related? #21604

@acaliaro
Copy link
Author

I don’t know… but he second webview outside the collection view is correctly visualized

@Dhivya-SF4094
Copy link
Contributor

This issue has been verified using Visual Studio 17.14.0(9.0.50) and Visual Studio Code 1.98.2 (9.0.50). It can be reproduced on iOS 18.2 (iPhone 12 and iPhone 16), macOS and Windows platforms.
Note: The issue reproduces on CV2 but does not reproduce on the Android platform.

@Dhivya-SF4094 Dhivya-SF4094 added platform/windows 🪟 platform/iOS 🍎 area-controls-collectionview CollectionView, CarouselView, IndicatorView s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed collectionview-cv2 labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants