In my AppFlowyEditor, if I have an empty entry, and I press delete (i.e. delete the empty line), then the Editor crashes.
The Editor also crashes if the editor is fully blank. In MacOS, I am allowed to delete an empty line by pressing backspace. This also happens when I delete a Table and the table was the last thing I had in the Editor.
Even worse, if the last thing I delete is a Table, then the Editor crashes, but also the app does not resume, and needs a full app restart to use it. This is the error when the last entry fully deleted is a table:
════════ Exception caught by gesture ═══════════════════════════════════════════
The following ArgumentError was thrown while handling a gesture:
Invalid argument(s): 0
When the exception was thrown, this was the stack:
#0 int.clamp (dart:core-patch/integers.dart:280:7)
integers.dart:280
#1 EditorStateSelection._findCloseNode (package:appflowy_editor/src/editor/editor_component/service/selection/shared.dart:98:16)
shared.dart:98
#2 EditorStateSelection.getNodeInOffset (package:appflowy_editor/src/editor/editor_component/service/selection/shared.dart:41:15)
shared.dart:41
#3 _DesktopSelectionServiceWidgetState.getNodeInOffset (package:appflowy_editor/src/editor/editor_component/service/selection/desktop_selection_service.dart:156:24)
desktop_selection_service.dart:156
#4 _DesktopSelectionServiceWidgetState._onTapDown (package:appflowy_editor/src/editor/editor_component/service/selection/desktop_selection_service.dart:210:18)
desktop_selection_service.dart:210
How to Reproduce
Add a table, being that table the only thing in the editor, then delete it. then press delete again.
OR
delete the last empty line in an Editor and tap on it again (reproduceable on MacOS only so far)
Expected Behavior
Should not crash.
Operating System
All systems, but the "just delete" I can't reproduce on Windows, but yes on MacOS. Strange!
Bug Description
In my AppFlowyEditor, if I have an empty entry, and I press delete (i.e. delete the empty line), then the Editor crashes. The Editor also crashes if the editor is fully blank. In MacOS, I am allowed to delete an empty line by pressing backspace. This also happens when I delete a Table and the table was the last thing I had in the Editor.
The MacOS version issue may be the one fixed here: https://github.com/AppFlowy-IO/appflowy-editor/issues/927 - not sure about the deleting table version of this issue
Even worse, if the last thing I delete is a Table, then the Editor crashes, but also the app does not resume, and needs a full app restart to use it. This is the error when the last entry fully deleted is a table:
How to Reproduce
Expected Behavior
Should not crash.
Operating System
All systems, but the "just delete" I can't reproduce on Windows, but yes on MacOS. Strange!
AppFlowy Editor Version(s)
4.0.0
Screenshots
No response
Additional Context
No response