Skip to content

[Mobile] Exception thrown ("targetChild should not be null") when deleting highlighted text #348

@adamkoch

Description

@adamkoch

Environment:

  • Flutter 2.2.3 • channel stable
  • flutter_quill: ^1.9.1

Repro steps:

  • Open flutter-quill editor in an app on iOS simulator (i have yet to check on a real iPhone as I don't have one available right now)
  • type out some text, then select all the text
  • choose "cut" or hit delete to remove the highlighted text
  • see targetChild should not be null exception as per below

Appreciate the awesome library and the work you do on it, thank you!

The following message was thrown building _TextSelectionHandleOverlay(dirty, dependencies: [_InheritedCupertinoTheme, _EffectiveTickerMode], state: _TextSelectionHandleOverlayState#421eb(ticker inactive)):
targetChild should not be null

The relevant error-causing widget was: 
  MaterialApp file:///Users/adam/src/app/lib/screens/root.dart:192:12
When the exception was thrown, this was the stack: 
#0      RenderEditableContainerBox.childAtPosition (package:flutter_quill/src/widgets/editor.dart:1140:7)
#1      RenderEditor.preferredLineHeight (package:flutter_quill/src/widgets/editor.dart:989:19)
#2      _TextSelectionHandleOverlayState.build (package:flutter_quill/src/widgets/text_selection.dart:447:45)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4691:27)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4574:15)
...
====================================================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions