-
Notifications
You must be signed in to change notification settings - Fork 62
Description
What happened?
This works fine when enabling accelerator keys and allowing the native Find behavior.
But when I disable AreBrowserAcceleratorKeysEnabled
and intercept Ctrl+F and call StartAsync
myself, after setting some filters, closing and reopening the Find popup twice, the filter selection is cleared.
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime), Prerelease (Edge Canary/Dev/Beta)
Runtime Version
143.0.3603 canary
SDK Version
3530.0
Framework
Winforms
Operating System
Windows 11
OS Version
26100.6584
Repro steps
Download minimal WinForms sample. In BrowserForm.cs::WebView2Control_CoreWebView2InitializationCompleted
, add in: this.webView2Control.CoreWebView2.Settings.AreBrowserAcceleratorKeysEnabled = false;
Replace WebView2Control_KeyDown
with:
private void WebView2Control_KeyDown(object sender, KeyEventArgs e)
{
var find = this.webView2Control.CoreWebView2.Find;
if (e.KeyCode == Keys.F)
{
var options = webView2Control.CoreWebView2.Environment.CreateFindOptions();
options.FindTerm = "";
find.StartAsync(options);
}
}
- press Ctrl+F
- search something
- change the filter (e.g. match case)
- close and reopen the Find popup
- notice filter is still set
- close and reopen the Find popup
- notice the filter selections are cleared
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