Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hkm5558 opened this issue Dec 24, 2024 · 0 comments

Comments

@hkm5558
Copy link
Contributor

hkm5558 commented Dec 24, 2024

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.<anonymous closure> (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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant