From 186f205cf2891df5a3c9ad127ad67b8266921fde Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Fri, 10 Jan 2025 09:56:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20the=20toolbar=20shouldn=E2=80=99t=20over?= =?UTF-8?q?=20the=20search=20panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspace/presentation/home/menu/sidebar/sidebar.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart index f9af95ad73a44..6906dc8b73beb 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:appflowy/generated/flowy_svgs.g.dart'; import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/blank/blank.dart'; +import 'package:appflowy/plugins/document/presentation/editor_notification.dart'; import 'package:appflowy/shared/feature_flags.dart'; import 'package:appflowy/shared/loading.dart'; import 'package:appflowy/startup/startup.dart'; @@ -469,7 +470,11 @@ class _SidebarSearchButton extends StatelessWidget { ], ), child: FlowyButton( - onTap: () => CommandPalette.of(context).toggle(), + onTap: () { + // exit editing mode when doing search to avoid the toolbar showing up + EditorNotification.exitEditing().post(); + CommandPalette.of(context).toggle(); + }, leftIcon: const FlowySvg(FlowySvgs.search_s), iconPadding: 12.0, margin: const EdgeInsets.only(left: 8.0),