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

[Problem/Bug]: WebView2CompositionControl in ScrollViewer doesn't respond to the keyboard #5057

Open
simon1689 opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@simon1689
Copy link

What happened?

We've been having issues with the airspace problem for a couple of years now and we're happy seeing it being resolved. In testing, I came across something very annoying.

We have a framework of our own which we use for every View we have in our application. In this templated View, we have a ScrollViewer. A couple of weeks ago I came across a solution for the problem of the navigation keys (left, right, up, down, PgUp, PgDown) not getting through to WebView2. So I decided to test the same scenario with the Composition Control and found out that the control does not respond at all to the keys. Apprently there is a focus problem.

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

132.0.2957.127

SDK Version

1.0.2957.106

Framework

WPF

Operating System

Windows 10

OS Version

No response

Repro steps

I made a test app with the following code:

<Window x:Class="WebView2_netcore.CompositionControlWithScrollViewer"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WebView2_netcore"
        mc:Ignorable="d"
        xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
        Title="Composition Control With ScrollViewer" 
        Height="800" 
        Width="1000">
    <Grid>
        <ScrollViewer>
            <wv2:WebView2CompositionControl Name="google" Source="https://www.google.com" />
        </ScrollViewer>
    </Grid>
</Window>

When the app starts, I try to typ something in Google, but nothing happens in the text box. This is a huge problem, that hopefully can be fixed so that we could go on using WebView2 without the airspace problems.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

@simon1689 simon1689 added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant