superlistapp / super_editor

A Flutter toolkit for building document editors and readers
https://superlist.com/SuperEditor/
MIT License
1.68k stars 245 forks source link

[SuperEditor] - Exceptions when deleting all content with a non-deletable node at start or end of the document #2393

Open miguelcmedeiros opened 1 day ago

miguelcmedeiros commented 1 day ago

When all content in the document is selected using CMD+A and then pressing delete or backspace, it will throw exceptions if there is a non-deletable node at the start and/or end of the document. Here are 2 tests that reproduce this issue, one for each case:

Non-deletable node at the end of the document

test that reproduces issue ```dart testWidgetsOnApple( 'selects all when CMD+A is pressed with a two-node document', (tester) async { await tester // .createDocument() .withCustomContent( MutableDocument( nodes: [ ParagraphNode( id: '1', text: AttributedText('This is some text'), ), HorizontalRuleNode(id: '2'), ], ), ) .pump(); await tester.placeCaretInParagraph("1", 0); // Select all content await tester.pressCmdA(); // Ensure everything is selected. expect( SuperEditorInspector.findDocumentSelection(), const DocumentSelection( base: DocumentPosition( nodeId: '1', nodePosition: TextNodePosition(offset: 0), ), extent: DocumentPosition( nodeId: '2', nodePosition: UpstreamDownstreamNodePosition.downstream(), ), ), ); await tester.pressDelete(); }, ); ```
exception ``` ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════ The following _TypeError was thrown while dispatching notifications for PausableValueNotifier: Null check operator used on a null value When the exception was thrown, this was the stack: #0 InspectDocumentSelection.selectUpstreamPosition (package:super_editor/src/core/document_selection.dart:387:62) #1 InspectDocumentSelection.getNodesInContentOrder (package:super_editor/src/core/document_selection.dart:378:30) #2 DocumentImeSerializer._serialize (package:super_editor/src/default_editor/document_ime/document_serialization.dart:69:31) #3 new DocumentImeSerializer (package:super_editor/src/default_editor/document_ime/document_serialization.dart:34:5) #4 DocumentImeInputClient._sendDocumentToIme (package:super_editor/src/default_editor/document_ime/document_ime_communication.dart:265:30) #5 DocumentImeInputClient._onContentChange (package:super_editor/src/default_editor/document_ime/document_ime_communication.dart:87:5) #6 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:437:24) #7 ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:559:5) #8 PausableValueNotifier.resumeNotifications (package:super_editor/src/infrastructure/pausable_value_notifier.dart:49:11) #9 MutableDocumentComposer.onTransactionEnd (package:super_editor/src/core/document_composer.dart:155:24) #10 Editor._onTransactionEnd (package:super_editor/src/core/editor.dart:331:16) #11 Editor.endTransaction (package:super_editor/src/core/editor.dart:231:5) #12 Editor.execute (package:super_editor/src/core/editor.dart:283:7) #13 CommonEditorOperations._deleteExpandedSelection (package:super_editor/src/default_editor/common_editor_operations.dart:1352:12) #14 CommonEditorOperations.deleteDownstream (package:super_editor/src/default_editor/common_editor_operations.dart:868:7) #15 deleteDownstreamContentWithDelete (package:super_editor/src/default_editor/text.dart:2378:43) #16 _SuperEditorHardwareKeyHandlerState._onKeyPressed (package:super_editor/src/default_editor/document_hardware_keyboard/document_physical_keyboard.dart:84:50) #17 _HighlightModeManager.handleKeyMessage (package:flutter/src/widgets/focus_manager.dart:2116:29) #18 KeyEventManager._dispatchKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1104:34) #19 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1176:17) #20 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235:49) #21 TestDefaultBinaryMessenger.handlePlatformMessage (package:flutter_test/src/test_default_binary_messenger.dart:99:42) #22 KeyEventSimulator._simulateKeyEventByRawEvent. (package:flutter_test/src/event_simulation.dart:655:79) #25 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #26 KeyEventSimulator._simulateKeyEventByRawEvent (package:flutter_test/src/event_simulation.dart:653:27) #27 KeyEventSimulator.simulateKeyDownEvent.simulateByRawEvent (package:flutter_test/src/event_simulation.dart:740:14) #28 KeyEventSimulator.simulateKeyDownEvent (package:flutter_test/src/event_simulation.dart:760:23) #29 simulateKeyDownEvent (package:flutter_test/src/event_simulation.dart:883:48) #30 WidgetController.sendKeyEvent (package:flutter_test/src/controller.dart:1998:32) #31 KeyboardInput.pressDelete (package:flutter_test_robots/src/keyboard.dart:278:11) #32 main... (file:///Users/miguel/Documents/GitHub/super_editor/super_editor/test/super_editor/supereditor_input_keyboard_actions_test.dart:2004:24) #33 testWidgetsOnMac. (package:flutter_test_runners/src/platform_runners.dart:96:7) #34 testWidgets.. (package:flutter_test/src/widget_tester.dart:189:15) #35 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1032:5) (elided 3 frames from dart:async and package:stack_trace) The PausableValueNotifier sending notification was: PausableValueNotifier#99818([Selection] - 1: 0) ════════════════════════════════════════════════════════════════════════════════════════════════════ ```

Non-deletable node at the start of the document

test that reproduces issue ```dart testWidgetsOnApple( 'selects all when CMD+A is pressed with a two-node document', (tester) async { await tester // .createDocument() .withCustomContent( MutableDocument( nodes: [ HorizontalRuleNode(id: '1'), ParagraphNode( id: '2', text: AttributedText('This is some text'), ), ], ), ) .pump(); await tester.placeCaretInParagraph("2", 0); // Select all content await tester.pressCmdA(); // Ensure everything is selected. expect( SuperEditorInspector.findDocumentSelection(), const DocumentSelection( base: DocumentPosition( nodeId: '1', nodePosition: UpstreamDownstreamNodePosition.upstream(), ), extent: DocumentPosition( nodeId: '2', nodePosition: TextNodePosition(offset: 17), ), ), ); await tester.pressDelete(); }, ); ```
exception ``` ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════ The following _Exception was thrown while dispatching notifications for PausableValueNotifier: Exception: Expected a UpstreamDownstreamNodePosition for position1 but received a TextNodePosition When the exception was thrown, this was the stack: #0 BlockNode.selectUpstreamPosition (package:super_editor/src/default_editor/box_component.dart:32:7) #1 InspectDocumentSelection.selectUpstreamPosition (package:super_editor/src/core/document_selection.dart:401:20) #2 InspectDocumentSelection.getNodesInContentOrder (package:super_editor/src/core/document_selection.dart:378:30) #3 DocumentImeSerializer._serialize (package:super_editor/src/default_editor/document_ime/document_serialization.dart:69:31) #4 new DocumentImeSerializer (package:super_editor/src/default_editor/document_ime/document_serialization.dart:34:5) #5 DocumentImeInputClient._sendDocumentToIme (package:super_editor/src/default_editor/document_ime/document_ime_communication.dart:265:30) #6 DocumentImeInputClient._onContentChange (package:super_editor/src/default_editor/document_ime/document_ime_communication.dart:87:5) #7 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:437:24) #8 ValueNotifier.value= (package:flutter/src/foundation/change_notifier.dart:559:5) #9 PausableValueNotifier.resumeNotifications (package:super_editor/src/infrastructure/pausable_value_notifier.dart:49:11) #10 MutableDocumentComposer.onTransactionEnd (package:super_editor/src/core/document_composer.dart:155:24) #11 Editor._onTransactionEnd (package:super_editor/src/core/editor.dart:331:16) #12 Editor.endTransaction (package:super_editor/src/core/editor.dart:231:5) #13 Editor.execute (package:super_editor/src/core/editor.dart:283:7) #14 CommonEditorOperations._deleteExpandedSelection (package:super_editor/src/default_editor/common_editor_operations.dart:1352:12) #15 CommonEditorOperations.deleteDownstream (package:super_editor/src/default_editor/common_editor_operations.dart:868:7) #16 deleteDownstreamContentWithDelete (package:super_editor/src/default_editor/text.dart:2378:43) #17 _SuperEditorHardwareKeyHandlerState._onKeyPressed (package:super_editor/src/default_editor/document_hardware_keyboard/document_physical_keyboard.dart:84:50) #18 _HighlightModeManager.handleKeyMessage (package:flutter/src/widgets/focus_manager.dart:2116:29) #19 KeyEventManager._dispatchKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1104:34) #20 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1176:17) #21 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235:49) #22 TestDefaultBinaryMessenger.handlePlatformMessage (package:flutter_test/src/test_default_binary_messenger.dart:99:42) #23 KeyEventSimulator._simulateKeyEventByRawEvent. (package:flutter_test/src/event_simulation.dart:655:79) #26 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #27 KeyEventSimulator._simulateKeyEventByRawEvent (package:flutter_test/src/event_simulation.dart:653:27) #28 KeyEventSimulator.simulateKeyDownEvent.simulateByRawEvent (package:flutter_test/src/event_simulation.dart:740:14) #29 KeyEventSimulator.simulateKeyDownEvent (package:flutter_test/src/event_simulation.dart:760:23) #30 simulateKeyDownEvent (package:flutter_test/src/event_simulation.dart:883:48) #31 WidgetController.sendKeyEvent (package:flutter_test/src/controller.dart:1998:32) #32 KeyboardInput.pressDelete (package:flutter_test_robots/src/keyboard.dart:278:11) #33 main... (file:///Users/miguel/Documents/GitHub/super_editor/super_editor/test/super_editor/supereditor_input_keyboard_actions_test.dart:2004:24) #34 testWidgetsOnMac. (package:flutter_test_runners/src/platform_runners.dart:96:7) #35 testWidgets.. (package:flutter_test/src/widget_tester.dart:189:15) #36 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1032:5) (elided 3 frames from dart:async and package:stack_trace) The PausableValueNotifier sending notification was: PausableValueNotifier#4b7a2([Selection] - 1: 0) ════════════════════════════════════════════════════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ The following _Exception was thrown building SelectionLeadersDocumentLayer(state: _SelectionLeadersDocumentLayerState#304d9): Exception: Expected nodePosition of type UpstreamDownstreamNodePosition but received: TextPosition(offset: 0, affinity: TextAffinity.downstream) The relevant error-causing widget was: SelectionLeadersDocumentLayer SelectionLeadersDocumentLayer:file:///Users/miguel/Documents/GitHub/super_editor/super_editor/lib/src/default_editor/super_editor.dart:1064:12 When the exception was thrown, this was the stack: #0 _BoxComponentState.getRectForPosition (package:super_editor/src/default_editor/box_component.dart:214:7) #1 _SingleColumnDocumentLayoutState.getRectForPosition (package:super_editor/src/default_editor/layout_single_column/_layout.dart:255:37) #2 _SelectionLeadersDocumentLayerState.computeLayoutDataWithDocumentLayout (package:super_editor/src/infrastructure/documents/selection_leader_document_layer.dart:102:31) #3 DocumentLayoutLayerState.computeLayoutData (package:super_editor/src/infrastructure/documents/document_layers.dart:50:12) #4 ContentLayerState.build (package:super_editor/src/infrastructure/content_layers.dart:963:21) #5 StatefulElement.build (package:flutter/src/widgets/framework.dart:5749:27) #6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5637:15) #7 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5800:11) #8 Element.rebuild (package:flutter/src/widgets/framework.dart:5353:7) #9 StatefulElement.update (package:flutter/src/widgets/framework.dart:5823:5) #10 Element.updateChild (package:flutter/src/widgets/framework.dart:3949:15) #11 ContentLayersElement.buildLayers. (package:super_editor/src/infrastructure/content_layers.dart:288:25) #12 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3046:19) #13 ContentLayersElement.buildLayers (package:super_editor/src/infrastructure/content_layers.dart:269:12) #14 RenderContentLayers.performLayout. (package:super_editor/src/infrastructure/content_layers.dart:618:17) #15 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:2738:59) #16 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:1108:15) #17 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2738:14) #18 RenderContentLayers.performLayout (package:super_editor/src/infrastructure/content_layers.dart:617:5) #19 RenderObject.layout (package:flutter/src/rendering/object.dart:2627:7) #20 _RenderSliverHybridStack.performLayout (package:super_editor/src/infrastructure/sliver_hybrid_stack.dart:58:12) #21 RenderObject.layout (package:flutter/src/rendering/object.dart:2627:7) #22 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:609:13) #23 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1524:12) #24 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1435:20) #25 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2465:7) #26 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1062:18) #27 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1075:15) #28 AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1435:27) #29 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:475:5) #30 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15) #31 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9) #32 AutomatedTestWidgetsFlutterBinding.pump. (package:flutter_test/src/binding.dart:1288:9) #35 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #36 AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1275:27) #37 WidgetTester.pumpAndSettle. (package:flutter_test/src/widget_tester.dart:726:23) #40 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #41 WidgetTester.pumpAndSettle (package:flutter_test/src/widget_tester.dart:719:27) #42 KeyboardInput.pressDelete (package:flutter_test_robots/src/keyboard.dart:279:11) #43 main... (file:///Users/miguel/Documents/GitHub/super_editor/super_editor/test/super_editor/supereditor_input_keyboard_actions_test.dart:2004:11) #44 testWidgetsOnMac. (package:flutter_test_runners/src/platform_runners.dart:96:7) #45 testWidgets.. (package:flutter_test/src/widget_tester.dart:189:15) #46 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1032:5) (elided 5 frames from dart:async and package:stack_trace) ════════════════════════════════════════════════════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ The following _Exception was thrown building CaretDocumentOverlay(state: CaretDocumentOverlayState#964c0(ticker inactive)): Exception: Expected nodePosition of type UpstreamDownstreamNodePosition but received: TextPosition(offset: 0, affinity: TextAffinity.downstream) The relevant error-causing widget was: CaretDocumentOverlay CaretDocumentOverlay:file:///Users/miguel/Documents/GitHub/super_editor/super_editor/lib/src/default_editor/super_editor.dart:1227:12 When the exception was thrown, this was the stack: #0 _BoxComponentState.getRectForPosition (package:super_editor/src/default_editor/box_component.dart:214:7) #1 _BoxComponentState.getEdgeForPosition (package:super_editor/src/default_editor/box_component.dart:197:25) #2 _SingleColumnDocumentLayoutState.getEdgeForPosition (package:super_editor/src/default_editor/layout_single_column/_layout.dart:239:37) #3 CaretDocumentOverlayState.computeLayoutDataWithDocumentLayout (package:super_editor/src/default_editor/document_caret_overlay.dart:169:24) #4 DocumentLayoutLayerState.computeLayoutData (package:super_editor/src/infrastructure/documents/document_layers.dart:50:12) #5 ContentLayerState.build (package:super_editor/src/infrastructure/content_layers.dart:963:21) #6 StatefulElement.build (package:flutter/src/widgets/framework.dart:5749:27) #7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5637:15) #8 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5800:11) #9 Element.rebuild (package:flutter/src/widgets/framework.dart:5353:7) #10 StatefulElement.update (package:flutter/src/widgets/framework.dart:5823:5) #11 Element.updateChild (package:flutter/src/widgets/framework.dart:3949:15) #12 ContentLayersElement.buildLayers. (package:super_editor/src/infrastructure/content_layers.dart:288:25) #13 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3046:19) #14 ContentLayersElement.buildLayers (package:super_editor/src/infrastructure/content_layers.dart:269:12) #15 RenderContentLayers.performLayout. (package:super_editor/src/infrastructure/content_layers.dart:618:17) #16 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:2738:59) #17 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:1108:15) #18 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2738:14) #19 RenderContentLayers.performLayout (package:super_editor/src/infrastructure/content_layers.dart:617:5) #20 RenderObject.layout (package:flutter/src/rendering/object.dart:2627:7) #21 _RenderSliverHybridStack.performLayout (package:super_editor/src/infrastructure/sliver_hybrid_stack.dart:58:12) #22 RenderObject.layout (package:flutter/src/rendering/object.dart:2627:7) #23 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:609:13) #24 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1524:12) #25 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1435:20) #26 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2465:7) #27 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1062:18) #28 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1075:15) #29 AutomatedTestWidgetsFlutterBinding.drawFrame (package:flutter_test/src/binding.dart:1435:27) #30 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:475:5) #31 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15) #32 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9) #33 AutomatedTestWidgetsFlutterBinding.pump. (package:flutter_test/src/binding.dart:1288:9) #36 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #37 AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1275:27) #38 WidgetTester.pumpAndSettle. (package:flutter_test/src/widget_tester.dart:726:23) #41 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #42 WidgetTester.pumpAndSettle (package:flutter_test/src/widget_tester.dart:719:27) #43 KeyboardInput.pressDelete (package:flutter_test_robots/src/keyboard.dart:279:11) #44 main... (file:///Users/miguel/Documents/GitHub/super_editor/super_editor/test/super_editor/supereditor_input_keyboard_actions_test.dart:2004:11) #45 testWidgetsOnMac. (package:flutter_test_runners/src/platform_runners.dart:96:7) #46 testWidgets.. (package:flutter_test/src/widget_tester.dart:189:15) #47 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1032:5) (elided 5 frames from dart:async and package:stack_trace) ════════════════════════════════════════════════════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ The following _Exception was thrown during a scheduler callback: Exception: Expected nodePosition of type UpstreamDownstreamNodePosition but received: TextPosition(offset: 0, affinity: TextAffinity.downstream) When the exception was thrown, this was the stack: #0 _BoxComponentState.getRectForPosition (package:super_editor/src/default_editor/box_component.dart:214:7) #1 _SingleColumnDocumentLayoutState.getRectForPosition (package:super_editor/src/default_editor/layout_single_column/_layout.dart:255:37) #2 SuperEditorImeInteractorState._computeCaretRectInViewportSpace (package:super_editor/src/default_editor/document_ime/supereditor_ime_interactor.dart:420:44) #3 SuperEditorImeInteractorState._reportCaretRectToIme (package:super_editor/src/default_editor/document_ime/supereditor_ime_interactor.dart:348:23) #4 SuperEditorImeInteractorState._reportVisualInformationToIme (package:super_editor/src/default_editor/document_ime/supereditor_ime_interactor.dart:300:7) #5 SuperEditorImeInteractorState._reportVisualInformationToIme. (package:super_editor/src/default_editor/document_ime/supereditor_ime_interactor.dart:309:24) #6 Frames.onNextFrame. (package:super_editor/src/infrastructure/flutter/flutter_scheduler.dart:72:11) #7 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15) #8 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1331:11) #9 AutomatedTestWidgetsFlutterBinding.pump. (package:flutter_test/src/binding.dart:1288:9) #12 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #13 AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:1275:27) #14 WidgetTester.pumpAndSettle. (package:flutter_test/src/widget_tester.dart:726:23) #17 TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:74:41) #18 WidgetTester.pumpAndSettle (package:flutter_test/src/widget_tester.dart:719:27) #19 KeyboardInput.pressDelete (package:flutter_test_robots/src/keyboard.dart:279:11) #20 main... (file:///Users/miguel/Documents/GitHub/super_editor/super_editor/test/super_editor/supereditor_input_keyboard_actions_test.dart:2004:11) #21 testWidgetsOnMac. (package:flutter_test_runners/src/platform_runners.dart:96:7) #22 testWidgets.. (package:flutter_test/src/widget_tester.dart:189:15) #23 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1032:5) (elided 5 frames from dart:async and package:stack_trace) ════════════════════════════════════════════════════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following message was thrown: Multiple exceptions (4) were detected during the running of the current test, and at least one was unexpected. ════════════════════════════════════════════════════════════════════════════════════════════════════ ```
miguelcmedeiros commented 1 day ago

Cc @matthew-carroll

angelosilvestre commented 1 day ago

@miguelcmedeiros What's the expected behavior these situations:

Non-deletable node at the end of the document: should an empty node be inserted as the first node? Should the document contain only the non-deletable node and no selection?

Non-deletable node at the start of the document: should an empty node be inserted as the last node? Should the document contain only the non-deletable node and no selection?