diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cacd97d..15832947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# [6.1.8] +* Recalculate focus when showing keyboard. + # [6.1.7] * Add czech localizations. diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 8c9ea96a..ce10e84f 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -1073,8 +1073,14 @@ class RawEditorState extends EditorState return; } if (_hasFocus) { + final keyboardAlreadyShown = _keyboardVisible; openConnectionIfNeeded(); - _showCaretOnScreen(); + if (keyboardAlreadyShown) { + _showCaretOnScreen(); + } else { + /// delay 500 milliseconds for waiting keyboard show up + Future.delayed(const Duration(milliseconds: 500), _showCaretOnScreen); + } } else { widget.focusNode.requestFocus(); } diff --git a/pubspec.yaml b/pubspec.yaml index e7a4ba38..2e7a33f3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) -version: 6.1.7 +version: 6.1.8 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill