From a5a1bb1f34f6f4bbad4bd9bfc8de865212ba4dce Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Fri, 18 Jul 2025 14:36:06 +0200 Subject: [PATCH] open tab when single --- .../features/browser/presentation/widgets/tab_preview.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_preview.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_preview.dart index 6ec159b8..a8ff1257 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_preview.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_preview.dart @@ -335,6 +335,12 @@ class TabTreePreview extends HookConsumerWidget { onTap: () async { if (entity.totalTabs > 1) { await TabTreeRoute(entity.rootId).push(context); + } else if (entity.tabId != activeTabId) { + //Close first to avoid rebuilds + onClose(); + await ref + .read(tabRepositoryProvider.notifier) + .selectTab(tab.id); } }, // onDeleteAll: (host) async {