From fb0a9cdccbb6d9495a61bbd8f7e25740bf638a97 Mon Sep 17 00:00:00 2001 From: Norbert Kozsir Date: Thu, 16 Jul 2026 19:29:38 +0200 Subject: [PATCH] textinput: implement onFocusReceived for master-SDK protocol drift --- lib/src/cef_web_view.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/src/cef_web_view.dart b/lib/src/cef_web_view.dart index 4a22c06..462ddd5 100644 --- a/lib/src/cef_web_view.dart +++ b/lib/src/cef_web_view.dart @@ -893,6 +893,14 @@ class _CefWebViewState extends State @override void showToolbar() {} + // Newer Flutter text-input protocol addition: the framework grew + // TextInputClient.onFocusReceived (platform re-focus for browser + // autofill). CEF owns its own focus lifecycle; decline, matching the + // framework default. Deliberately omit @override for pre-3.41 SDKs, where + // the member does not exist; on newer SDKs this is the intended override. + // ignore: annotate_overrides + bool onFocusReceived() => false; + @override void connectionClosed() { _textInput = null;