Skip to content

Failed assertion: line 1394 pos 12: 'container.containsOffset(position.offset)' after link editing  #2196

Closed as not planned
@IWasYourTomb

Description

@IWasYourTomb

Is there an existing issue for this?

Flutter Quill version

10.5.9

Steps to reproduce

  1. insert link from link dialog
  2. set cursor at the middle of the text and type something
  3. open link dialog again and remove text that we type later from editor

Expected results

Change link text

Actual results

======== Exception caught by scheduler library =====================================================
The following assertion was thrown during a scheduler callback:
The provided text position is not in the current node
'package:flutter_quill/src/editor/widgets/text/text_line.dart':
Failed assertion: line 1394 pos 12: 'container.containsOffset(position.offset)'

When the exception was thrown, this was the stack:
#2 RenderEditableTextLine.globalToLocalPosition (package:flutter_quill/src/editor/widgets/text/text_line.dart:1394:12)
#3 RenderEditor.getLocalRectForCaret (package:flutter_quill/src/editor/editor.dart:1331:39)
#4 RawEditorStateTextInputClientMixin._updateCaretRectIfNeeded (package:flutter_quill/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart:122:26)
#5 RawEditorStateTextInputClientMixin._updateCaretRectIfNeeded. (package:flutter_quill/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart:126:40)
#6 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#7 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1331:11)
#8 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#9 _invoke (dart:ui/hooks.dart:312:13)
#10 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#11 _drawFrame (dart:ui/hooks.dart:283:31)
(elided 2 frames from class _AssertionError)

Code sample

Code sample
[Paste your code here]

Additional Context

Screenshots / Video demonstration

[Upload media here]

Logs
[Paste your logs here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions