question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to Interact with WebView in WinUI 2.6

See original GitHub issue

Describe the bug Unable to interact with Contents of WebView. (Clicking Links, Scrolling etc.) This does not exist when downgrading to 2.5.0

Steps to reproduce the bug This from XAML Controls Gallery <WebView Source="https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/web-view" /> you won’t be able to scroll/click any of the links Can observe this behavior in the XAML Controls Gallery App itself.

Expected behavior Can Interact with WebView like 2.5.0

Version Info NuGet package version: [Microsoft.UI.Xaml 2.6.0]

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
19043 Yes
October 2020 Update (19042)
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
ranjeshjcommented, Jul 7, 2021

Looks like the rounding of the navigation view content area is causing this issue in certain OS versions.

As a workaround, setting NavigationViewContentGridCornerRadius to 0 might mitigate this issue. https://docs.microsoft.com/en-us/windows/apps/design/style/mica#standard-pattern-in-top-navigationview

3reactions
wherewherecommented, Jan 12, 2023

I found how to fix it! You can’t set BorderBush and CornerRadius in same time, or the WebView will can’t be clicked. You can just remove the BorderBush, then you can use WebView with CornerRadius now. Like this https://github.com/Coolapk-UWP/Coolapk-UWP/blob/revived/CoolapkUWP/CoolapkUWP/Controls/NavigationView/NavigationView.xaml#L20-L709

<SplitView.Content>
    <Border
        x:Name="ContentBorder"
        Margin="{ThemeResource NavigationViewContentMargin}"
        CornerRadius="{ThemeResource NavigationViewContentGridCornerRadius}">
        <Grid
            x:Name="ContentGrid"
            Background="{ThemeResource NavigationViewContentBackground}"
            BorderBrush="{ThemeResource NavigationViewContentGridBorderBrush}"
            BorderThickness="{ThemeResource NavigationViewContentGridBorderThickness}">
...
Read more comments on GitHub >

github_iconTop Results From Across the Web

Is WebView not supported in a MUXC:Navigation
This is a known issue that has been reported on WinUI Github issues-Unable to Interact with WebView in WinUI 2.6.
Read more >
Known Issues in WebView control - Windows Community ...
To workaround this issue, see the Enable the WebView control to appear properly on high DPI displays section of the WebView guide. Performance....
Read more >
How do you get WebView to work on WinUI with local web ...
In an attempt to migrate a published Xamarin app to .NET MAUI, I am finding it difficult for WebView to work with WinUI...
Read more >
Untitled
Webview doesnt work after installforge Unable to Interact with WebView in WinUI 2.6 #5299 - Github Webview2 does not work anymore.
Read more >
If UWP had never been created, would Windows be ...
And WinUI 2.7 got the WebView component when it wasn't even meant to, and that's UWP! I don't think they'll stop making UWP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found