Skip to content

[Problem/Bug]: Detect if a Find session is in progress or has been stopped #5062

Open
@pushkin-

Description

What happened?

I detect Ctrl+F/F3 in my app.

When Ctrl+F is pressed, I use the StartAsync API to show the Find popup.

If F3 is pressed, I'll show the Find popup in the same way if one isn't already, but if it's started already, I want to continue searching the same Find session.

I need to know if a Find is in progress or not. Closing the Find popup and then querying the FindInterface still shows an active session (I suppose, because Stop wasn't explicitly called):
Image
(it still shows this after the Find popup is closed; it's possible this is expected actually since the Find text is preservered in a browser too when closing and reopening it; though in WebView2 it's only preserved once and then the text I was searching for gets reset)

I want to know when the FInd popup was closed, so I can know if F3 should open a new Find popup via StartAsync or continue a search via FindNext/FindPrevious. Also, if the Find UI has been closed, I can call Stop() to clear out the text in the Find UI, since in my case, I want to reset everything on close.

So perhaps an event that's triggered when the popup closes would be useful here; alternatively, it might be nice to call one API and have it figure out if it should open a new Find popup or focus and search an existing one.
StartAsync will do a search if a find session is in progress, but it will search in the same direction as was searched last time (according to the docs). If a user presses Shift+F3 or F3, I want to adjust the search direction in response to that which would require explicitly calling FindNext or FindPrevious (which doesn't seem to work as per #5060)

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions