Skip to content

[Catalyst] WebView does not display ContextFlyout on right-click #30308

@kubaflo

Description

@kubaflo

Description

The ContextFlyout property does not work with WebView. When a MenuFlyout is assigned to the ContextFlyout of a WebView, it never appears on right-click. This works as expected on other controls, but WebView ignores it entirely and overrides it with its own implementation.

You can see this bug even in the Maui Controls sample App

Steps to Reproduce

<WebView x:Name="ContextMenuWebView" Source="https://bing.com" MinimumHeightRequest="400">
<FlyoutBase.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Go to MAUI repo" Clicked="OnWebViewGoToSiteClicked"></MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="Invoke some JS" Clicked="OnWebViewInvokeJSClicked"></MenuFlyoutItem>
</MenuFlyout>
</FlyoutBase.ContextFlyout>
</WebView>

<WebView x:Name="ContextMenuWebView" Source="https://bing.com" MinimumHeightRequest="400">
    <FlyoutBase.ContextFlyout>
        <MenuFlyout>
            <MenuFlyoutItem Text="Go to MAUI repo" Clicked="OnWebViewGoToSiteClicked"></MenuFlyoutItem>
            <MenuFlyoutSeparator />
            <MenuFlyoutItem Text="Invoke some JS" Clicked="OnWebViewInvokeJSClicked"></MenuFlyoutItem>
        </MenuFlyout>
    </FlyoutBase.ContextFlyout>
</WebView>
Screen.Recording.2025-06-30.at.01.05.11.mov

Metadata

Metadata

Assignees

Labels

platform/macosmacOS / Mac Catalysts/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