-
Notifications
You must be signed in to change notification settings - Fork 54
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]: Find::Stop doesn't clear previous search term #5068
Comments
@pushkin- Thanks for reaching out. I see this is a default behavior in edge browser as well.Could you please confirm? |
@krbharadwaj ok yes, the navigation not clearing the search term happens in Edge too. I called that out in the issue report. My report is specifically asking for a way to clear the search term, which I was hoping we could do with the I suppose I could paste some screenshot here later, but it would just be of the Find popup with a search term in it which doesn't seem very helpful. Is there something in particular you're looking for here, or that you need clarification on? |
@pushkin- https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2find?view=webview2-winrt-1.0.3079-prerelease#startasync:~:text=Calling%20Start%20without%20altering%20its%20parameters%20will%20behave%20either%20as%20FindNext%20or%20FindPrevious%2C%20depending%20on%20the%20most%20recent%20search%20action%20performed. According to this you need to alter the search options to make it clear the last searched term.. |
@krbharadwaj I already do this. When Ctrl+F is detected, I do:
Ctrl+F opens with the old search term. |
@pushkin- This seem to be an issue then. Let me check on that and get back! |
What happened?
I need to detect when a navigation happens in my app and clear the previous search term to prevent PHI/PII from being saved in there on the login screen for instance.
It seems that by default, the Find popup is closed but the contents are preserved. This is consistent with browsers, so this is fine as the default behavior.
But I was hoping that I could call
Stop
to fully stop/reset the Find session, but it doesn't help. The old search term persists.Perhaps
Stop
is already called by WebView2 code on navigations and isn't intended to clear the old search term / reset to the default, but having some way of doing this would be useful. Perhaps a flag I can pass to theStop
function?Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Prerelease (Edge Canary/Dev/Beta)
Runtime Version
134.0.3101.0 canary
SDK Version
1.0.3079.0 prerelease
Framework
Winforms
Operating System
Windows 11
OS Version
23H2 - 22631.4602
Repro steps
can post an example if you'd like
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
The text was updated successfully, but these errors were encountered: