-
Couldn't load subscription status.
- Fork 62
Description
What happened?
I have a UWP Xbox App with a WebView2 container that points to a web URL. I've mapped the gamepad keys to manually send the KeyboardEvents into the WebView2 so I'd like to set AllowHostInputProcessing to true so the same events don't get invoked within the webview. However, when I set the AllowHostInputProcessing to true in CoreWebView2ControllerOptions, it throws 'System.InvalidCastException'. I have the latest version of WebView2 v1.0.3537.50.
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
No response
Framework
WinUI2/UWP
Operating System
Windows 11
OS Version
No response
Repro steps
This code block will cause the error to occur.
`
var webView2Environment = await CoreWebView2Environment.CreateWithOptionsAsync(string.Empty, string.Empty, new CoreWebView2EnvironmentOptions()
{
AreBrowserExtensionsEnabled = true,
});
var opts = webView2Environment.CreateCoreWebView2ControllerOptions();
opts.AllowHostInputProcessing = true;
`
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