From 2ea29d56a14b72d2da94eadee992a305b2e49649 Mon Sep 17 00:00:00 2001 From: spChief Date: Fri, 7 Apr 2023 14:56:31 +0700 Subject: [PATCH] fix non scrollable editor exception, when tapped under content (#1167) --- lib/src/widgets/editor.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/editor.dart b/lib/src/widgets/editor.dart index d808552d..4ddbfcae 100644 --- a/lib/src/widgets/editor.dart +++ b/lib/src/widgets/editor.dart @@ -1794,7 +1794,10 @@ class RenderEditableContainerBox extends RenderBox dy += child.size.height; child = childAfter(child); } - throw StateError('No child at offset $offset.'); + + // this case possible, when editor not scrollable, + // but minHeight > content height and tap was under content + return lastChild!; } @override