AppFlowy-IO / AppFlowy-IO/appflowy-editor

[Bug] After selecting all and pressing delete on the keyboard, the editor can no longer function.

Aperta
#1,001 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Dart
Stelle
684
Fork
329
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Bug Description

When double-tap the text, select "Select All" from the toolbar that appears, and then click "Delete,", the editor can no longer function. The official demo can reproduce this problem.

```
Flutter Error Caught: Invalid argument(s): 0
StackTrace: #0 int.clamp (dart:core-patch/integers.dart:280:7)
#1 EditorStateSelection._findCloseNode (package:appflowy_editor/src/editor/editor_component/service/selection/shared.dart:98:16)
#2 EditorStateSelection.getNodeInOffset (package:appflowy_editor/src/editor/editor_component/service/selection/shared.dart:41:15)
#3 _MobileSelectionServiceWidgetState.getNodeInOffset (package:appflowy_editor/src/editor/editor_component/service/selection/mobile_selection_service.dart:364:24)
#4 _MobileSelectionServiceWidgetState._onTapUpIOS (package:appflowy_editor/src/editor/editor_component/service/selection/mobile_selection_service.dart:585:20)
#5 MobileSelectionGestureDetectorState._tapDownDelegate (package:appflowy_editor/src/service/selection/mobile_selection_gesture.dart:119:24)
#6 TapGestureRecognizer.handleTapUp. (package:flutter/src/gestures/tap.dart:653:57)
#7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:351:24)
```

### How to Reproduce

When running the demo project on iOS, if you double-tap the text, select "Select All" from the toolbar that appears, and then click "Delete," the following error will be reported. The official demo can reproduce this problem.

### Expected Behavior

We hope to delete the content normally without errors, ensuring the editor functions properly.

### Operating System

iOS

### AppFlowy Editor Version(s)

4.0.0

### Screenshots

_No response_

### Additional Context

_No response_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.