Skip to content

Commit d6d591f

Browse files
committed
fix: select all shouldn't include the cover plugin
1 parent 0570615 commit d6d591f

File tree

1 file changed

+3
-1
lines changed
  • frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers

1 file changed

+3
-1
lines changed

frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/select_all_handler.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ ShortcutEventHandler selectAllHandler = (editorState, event) {
88
if (editorState.document.root.children.isEmpty) {
99
return KeyEventResult.handled;
1010
}
11-
final firstNode = editorState.document.root.children.first;
11+
final firstNode = editorState.document.root.children.firstWhere(
12+
(element) => element is TextNode,
13+
);
1214
final lastNode = editorState.document.root.children.last;
1315
var offset = 0;
1416
if (lastNode is TextNode) {

0 commit comments

Comments
 (0)