Skip to content

Commit

Permalink
fix: using space bar to move the cursor not working on Android (AppFl…
Browse files Browse the repository at this point in the history
  • Loading branch information
asjqkkkk authored and LucasXu0 committed Jan 7, 2025
1 parent ea1eb16 commit 14c41a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Future<void> onNonTextUpdate(
// for the another keyboards (e.g. system keyboard), they will trigger the
// `onFloatingCursor` event instead.
AppFlowyEditorLog.input.debug('[Android] onNonTextUpdate: $nonTextUpdate');
if (selection != null && selection != editorState.selection) {
if (selection != null) {
editorState.updateSelectionWithReason(
Selection.collapsed(
Position(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class MarkdownParagraphParserV2 extends CustomMarkdownParser {
// Transform each split content into a paragraph node
final result = <Node>[];
for (final content in splitContent) {
final deltaDecoder = DeltaMarkdownDecoder();
final delta = deltaDecoder.convertNodes(content);
result.add(paragraphNode(delta: delta));

for (final node in content) {
if (node is md.Element && node.tag == 'img') {
final image = const MarkdownImageParserV2()
Expand All @@ -51,9 +55,6 @@ class MarkdownParagraphParserV2 extends CustomMarkdownParser {
continue;
}
}
final deltaDecoder = DeltaMarkdownDecoder();
final delta = deltaDecoder.convertNodes([node]);
result.add(paragraphNode(delta: delta));
}
}

Expand Down

0 comments on commit 14c41a0

Please sign in to comment.