diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae32204..3f23d572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,4 +99,7 @@ * cursor focus when keyboard is on. ## [0.3.2] -* Fix cursor focus issue when keyboard is on. \ No newline at end of file +* Fix cursor focus issue when keyboard is on. + +## [0.3.3] +* More fix on cursor focus issue when keyboard is on. \ No newline at end of file diff --git a/lib/widgets/editor.dart b/lib/widgets/editor.dart index 29472aae..0c4668d0 100644 --- a/lib/widgets/editor.dart +++ b/lib/widgets/editor.dart @@ -876,19 +876,17 @@ class RenderEditor extends RenderEditableContainerBox double getOffsetToRevealCursor( double viewportHeight, double scrollOffset, double offsetInViewport) { List endpoints = getEndpointsForSelection(selection); - if (endpoints.length != 1) { - return null; - } + TextSelectionPoint endpoint = endpoints.first; RenderEditableBox child = childAtPosition(selection.extent); const kMargin = 8.0; - double caretTop = endpoints.single.point.dy - + double caretTop = endpoint.point.dy - child.preferredLineHeight(TextPosition( offset: selection.extentOffset - child.getContainer().getOffset())) - kMargin + offsetInViewport; - final caretBottom = endpoints.single.point.dy + kMargin + offsetInViewport; + final caretBottom = endpoint.point.dy + kMargin + offsetInViewport; double dy; if (caretTop < scrollOffset) { dy = caretTop; diff --git a/pubspec.yaml b/pubspec.yaml index 90baae21..9c6efdc4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: One client and affiliated collaborator of Flutter Quill is Bullet Journal App. -version: 0.3.2 +version: 0.3.3 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill.git