[Problem/Bug]: Find:StartAsync clears existing entry on a delay when passing a new FindTerm in
What happened?
If I trigger the Find popup and pass in a starting search term like this:
var findOptions = wv2.CoreWebView2.Environment.CreateFindOptions();
findOptions.FindTerm = "a";
wv2.CoreWebView2.Find.StartAsync(findOptions);
It takes a second or so for the previous search term to be replaced by the new one, so there's a moment where the user can still see the old term.
If you set the FindTerm to be longer (findOptions.FindTerm = "aaaaaaaaaaaaaaaaaaaaaaaaa";), the change becomes near-instantaneous.
Importance
Low. My app is not very affected, or this only affects development.
Runtime Channel
Prerelease (Edge Canary/Dev/Beta)
Runtime Version
136.0.3216.0 canary
SDK Version
3116.0
Framework
Winforms
Operating System
Windows 11
OS Version
24H2 OS Build 26100.3476
Repro steps
- open sample WinForms app
- In
WebView2Control_CoreWebView2InitializationCompleted, addthis.webView2Control.CoreWebView2.Settings.AreBrowserAcceleratorKeysEnabled = false; - In
WebView2Control_KeyDown, add this code:
if (e.KeyCode == Keys.F && Control.ModifierKeys.HasFlag(Keys.Control))
{
e.Handled = true;
var wv2 = (WebView2)sender;
var findOptions = wv2.CoreWebView2.Environment.CreateFindOptions();
findOptions.FindTerm = "a";
wv2.CoreWebView2.Find.StartAsync(findOptions);
}
- Run the app
- press ctrl+f
- type some text in there
- close the popup
- press ctrl f
- notice the text you typed is still in there and gets replaced with "a" in a second
- If you make the
FindTermlonger (e.g."aaaaaaaaaaaaaaaaaaaaaaaaa"), the change happens more quickly
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
can you check if you still see this issue in the runtime >=143.0.3624.0
still an issue