|
|
|
@ -722,6 +722,7 @@ class RawEditorState extends EditorState |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
KeyEventResult _handleSpaceKey(RawKeyEvent event) { |
|
|
|
|
try { |
|
|
|
|
final child = |
|
|
|
|
controller.document.queryChild(controller.selection.baseOffset); |
|
|
|
|
if (child.node == null) { |
|
|
|
@ -733,6 +734,10 @@ class RawEditorState extends EditorState |
|
|
|
|
return KeyEventResult.ignored; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (line.first == null) { |
|
|
|
|
return KeyEventResult.ignored; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final text = castOrNull<leaf.Text>(line.first); |
|
|
|
|
if (text == null) { |
|
|
|
|
return KeyEventResult.ignored; |
|
|
|
@ -748,8 +753,11 @@ class RawEditorState extends EditorState |
|
|
|
|
} else { |
|
|
|
|
return KeyEventResult.ignored; |
|
|
|
|
} |
|
|
|
|
} catch (e) { |
|
|
|
|
print("Caught exception: $e"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return KeyEventResult.handled; |
|
|
|
|
return KeyEventResult.ignored; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
KeyEventResult _handleTabKey(RawKeyEvent event) { |
|
|
|
|