fix(flutter_desktop): document search (#6669)

* fix: double dispose on find menu

* fix: empty query not resetting search service

* fix: input focus getting lost after clicking button or pressing enter

* chore: remove unused focus node and text controller

* chore: bump appflowy editor

* chore: code cleanup

* chore: fix focus getting lost on submission

* fix: next match focuses on title after jumping

* chore: bump appflowy editor

* revert: unnecessary changes to FlowyFormTextInput

* fix: title requesting focus unexpectedly

* Update frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/header/cover_title.dart

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>

* chore: merge conflicts

* chore: code cleanup

* test: add integration test

* fix: show replace menu icon color in dark mode

---------

Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
This commit is contained in:
Richard Shiue 2024-11-14 17:02:34 +03:00 committed by GitHub
parent 1952ef0853
commit 941b7cf04c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 315 additions and 154 deletions

View file

@ -161,7 +161,16 @@ class _DocumentPageState extends State<DocumentPage>
}
return Provider(
create: (_) => SharedEditorContext(),
create: (_) {
final context = SharedEditorContext();
if (widget.view.name.isEmpty) {
WidgetsBinding.instance.addPostFrameCallback((_) {
context.coverTitleFocusNode.requestFocus();
});
}
return context;
},
dispose: (buildContext, editorContext) => editorContext.dispose(),
child: EditorTransactionService(
viewId: widget.view.id,
editorState: state.editorState!,