Skip to content

feat(input): ⌘F opens the host's find bar (onFind callback)#20

Merged
wenkaifan0720 merged 1 commit into
mainfrom
feat/webview-find-shortcut
Jul 3, 2026
Merged

feat(input): ⌘F opens the host's find bar (onFind callback)#20
wenkaifan0720 merged 1 commit into
mainfrom
feat/webview-find-shortcut

Conversation

@wenkaifan0720

Copy link
Copy Markdown
Collaborator

The find-in-page backend already exists end-to-end (CefWebController.find/stopFind + onFindResult, down to native CefFindHandler::OnFindResult). The only gap: ⌘F was consumed by the focused view.

Adds an optional onFind callback to CefWebView — ⌘F invokes it (the host opens its own find bar, which drives the existing find API) and consumes the key; when null, ⌘F falls through to the page (a page can implement its own find). Dart-only — no native/protocol change, so the same host applies (no republish).

Tests: ⌘F→onFind (consumed) + ⌘F-without-onFind (falls through). Suite 143 green.

🤖 Generated with Claude Code

The find-in-page backend already exists end-to-end (CefWebController.find/stopFind + onFindResult
down to native CefFindHandler); the only gap was ⌘F, which the focused view consumed. Add an
optional onFind VoidCallback to CefWebView: ⌘F invokes it (the host opens its own find bar, which
drives the existing find API) and consumes the key; when null, ⌘F falls through to the page as
before. Dart-only — no native/protocol change, so no host republish.

Tests: ⌘F→onFind (consumed) and ⌘F-without-onFind (falls through to the page); suite 143 green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wenkaifan0720 wenkaifan0720 merged commit ebc8dc6 into main Jul 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant