From a46bafc189402dd0aeebdf31d9c12432ef559f3b Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Sun, 5 Jul 2026 09:19:34 +0200 Subject: [PATCH] select text after bang selection --- .../presentation/widgets/smart_bang_selector.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/weblibre/lib/features/geckoview/features/search/presentation/widgets/smart_bang_selector.dart b/apps/weblibre/lib/features/geckoview/features/search/presentation/widgets/smart_bang_selector.dart index bfd3b8a9..9471b6bc 100644 --- a/apps/weblibre/lib/features/geckoview/features/search/presentation/widgets/smart_bang_selector.dart +++ b/apps/weblibre/lib/features/geckoview/features/search/presentation/widgets/smart_bang_selector.dart @@ -320,6 +320,17 @@ class _BangChipsList extends HookConsumerWidget { ref .read(selectedBangTriggerProvider(domain: domain).notifier) .setTrigger(bang.toKey()); + + // Highlight the full query so the user can immediately type over it to + // replace the search term, or run it against the newly selected provider + // as-is. Skipped when the text was cleared above (URL case). + final text = searchTextController.text; + if (text.isNotEmpty) { + searchTextController.selection = TextSelection( + baseOffset: 0, + extentOffset: text.length, + ); + } } Future _handleDeletion(