mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: unexpect behaviour when pressing enter key
This commit is contained in:
parent
79591791c1
commit
046faf3880
@ -67,7 +67,7 @@ FlowyKeyEventHandler enterWithoutShiftInTextNodesHandler =
|
||||
// If selection is collapsed and position.start.offset == 0,
|
||||
// insert a empty text node before.
|
||||
if (selection.isCollapsed && selection.start.offset == 0) {
|
||||
if (textNode.toRawString().isEmpty) {
|
||||
if (textNode.toRawString().isEmpty && textNode.subtype != null) {
|
||||
final afterSelection = Selection.collapsed(
|
||||
Position(path: textNode.path, offset: 0),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user