diff --git a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart index 2d1953c68c..bd3f838f3a 100644 --- a/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart +++ b/frontend/appflowy_flutter/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart @@ -449,12 +449,12 @@ Position? _goUp(EditorState editorState) { final rect = rects.reduce( (current, next) => current.bottom >= next.bottom ? current : next, ); - offset = rect.topRight.translate(0, -rect.height); + offset = rect.center.translate(0, -rect.height); } else { final rect = rects.reduce( (current, next) => current.top <= next.top ? current : next, ); - offset = rect.topLeft.translate(0, -rect.height); + offset = rect.center.translate(0, -rect.height); } return editorState.service.selectionService.getPositionInOffset(offset); } @@ -470,12 +470,12 @@ Position? _goDown(EditorState editorState) { final rect = rects.reduce( (current, next) => current.bottom >= next.bottom ? current : next, ); - offset = rect.bottomRight.translate(0, rect.height); + offset = rect.center.translate(0, rect.height); } else { final rect = rects.reduce( (current, next) => current.top <= next.top ? current : next, ); - offset = rect.bottomLeft.translate(0, rect.height); + offset = rect.center.translate(0, rect.height); } return editorState.service.selectionService.getPositionInOffset(offset); }