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]: UWP XBOX Pointer cannot reach whole WebView2 content #4133

Closed
remokeitel opened this issue Nov 6, 2023 · 2 comments
Closed
Labels
bug Something isn't working tracked We are tracking this work internally.

Comments

@remokeitel
Copy link

remokeitel commented Nov 6, 2023

What happened?

In XBOX UWP app when pointer is used with WebView2 control, the pointer cannot be moved within the whole WebView2 area.

App.xaml.cs:

public App()
{
    this.InitializeComponent();
    this.Suspending += OnSuspending;

    if (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Xbox")
    {
        this.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested;
        //ApplicationViewScaling.TrySetDisableLayoutScaling(true);
    }
}

MainPage.xaml:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <TextBox Grid.Row="0" Text="Test" />
    <controls:WebView2
        x:Name="WebView2"
        Grid.Row="1"
        IsFocusEngagementEnabled="True"
        RequiresPointer="WhenEngaged"
        Source="https://www.itschmie.de"
        Loaded="WebView2_Loaded"
        GotFocus="WebView2_GotFocus" />
</Grid>

MainPage.xaml.cs:

public MainPage()
{
    this.InitializeComponent();
}

private async void WebView2_Loaded(object sender, RoutedEventArgs args)
{
    await WebView2.EnsureCoreWebView2Async();
    [...]
}

private void WebView2_GotFocus(object sender, RoutedEventArgs args)
{
    WebView2.IsFocusEngaged = true;
}

With WebView (version 1) there is no issue with the pointer!

Importance

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

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

1.0.2088.41

Framework

WinUI2/UWP

Operating System

Xbox

OS Version

10.0.25398.2538

Repro steps

The UWP app is configured for the Xbox so that the pointer mode is only enabled when requested (RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested). The scaling is set to default (200 % for UWP apps). A page was created with a WebView2 control. The control has the properties “RequiresPointer=WhenEngaged” and “IsFocusEngagementEnabled=True”. As soon as the control receives the focus and the pointer mode is activated (IsFocusEngaged = True), the pointer appears. However, the pointer can only be used in 25 % of the area of the control at the top left. As soon as scaling is disabled (ApplicationViewScaling.TrySetDisableLayoutScaling(true)) and the app is displayed at 100 %, the pointer can be navigated over the entire area of the control.

Expected behavior: Pointer can be moved within whole WebView2 area when focused and engaged.

Regression

No, this never worked

Last working version (if regression)

No response

AB#47779728

@remokeitel remokeitel added the bug Something isn't working label Nov 6, 2023
@remokeitel remokeitel closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
@remokeitel remokeitel reopened this Nov 10, 2023
@remokeitel remokeitel closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
@remokeitel remokeitel reopened this Nov 13, 2023
@jennifer-jacobs
Copy link

Hi @remokeitel!
Thank you for reporting the bug, we're tracking this internally and will reply here with any updates.

@jennifer-jacobs jennifer-jacobs added the tracked We are tracking this work internally. label Nov 21, 2023
@champnic
Copy link
Member

champnic commented Dec 4, 2023

@remokeitel This has been fixed by the Xbox team and should be available in a future Xbox update (not a WebView2 runtime or SDK update). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants