[chore]: remove code

pull/2128/head
xuyang 8 months ago
parent 9cf0630261
commit 12fb345195
  1. 6
      lib/src/editor/widgets/delegate.dart

@ -647,7 +647,7 @@ class EditorTextSelectionGestureDetectorBuilder {
@protected @protected
void onDragSelectionStart(TapDragStartDetails details) { void onDragSelectionStart(TapDragStartDetails details) {
if (delegate.selectionEnabled == false) return; if (delegate.selectionEnabled == false) return;
if (editor?.textEditingValue.selection.isCollapsed == false) return; // if (editor?.textEditingValue.selection.isCollapsed == false) return;
final kind = details.kind; final kind = details.kind;
shouldShowSelectionToolbar = kind == null || shouldShowSelectionToolbar = kind == null ||
@ -755,7 +755,7 @@ class EditorTextSelectionGestureDetectorBuilder {
@protected @protected
void onDragSelectionUpdate(TapDragUpdateDetails updateDetails) { void onDragSelectionUpdate(TapDragUpdateDetails updateDetails) {
if (delegate.selectionEnabled == false) return; if (delegate.selectionEnabled == false) return;
if (editor?.textEditingValue.selection.isCollapsed == false) return; // if (editor?.textEditingValue.selection.isCollapsed == false) return;
if (!_isShiftPressed) { if (!_isShiftPressed) {
// Adjust the drag start offset for possible viewport offset changes. // Adjust the drag start offset for possible viewport offset changes.
final editableOffset = final editableOffset =
@ -965,7 +965,7 @@ class EditorTextSelectionGestureDetectorBuilder {
/// which triggers this callback. /// which triggers this callback.
@protected @protected
void onDragSelectionEnd(TapDragEndDetails details) { void onDragSelectionEnd(TapDragEndDetails details) {
if (editor?.textEditingValue.selection.isCollapsed == false) return; // if (editor?.textEditingValue.selection.isCollapsed == false) return;
renderEditor!.handleDragEnd(details); renderEditor!.handleDragEnd(details);
if (isDesktop(supportWeb: true) && if (isDesktop(supportWeb: true) &&
delegate.selectionEnabled && delegate.selectionEnabled &&

Loading…
Cancel
Save