Skip to content

Commit 65c38a8

Browse files
committed
Recalculate focus when showing keyboard
1 parent f66145b commit 65c38a8

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# [6.1.8]
2+
* Recalculate focus when showing keyboard.
3+
14
# [6.1.7]
25
* Add czech localizations.
36

lib/src/widgets/raw_editor.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,14 @@ class RawEditorState extends EditorState
10731073
return;
10741074
}
10751075
if (_hasFocus) {
1076+
final keyboardAlreadyShown = _keyboardVisible;
10761077
openConnectionIfNeeded();
1077-
_showCaretOnScreen();
1078+
if (keyboardAlreadyShown) {
1079+
_showCaretOnScreen();
1080+
} else {
1081+
/// delay 500 milliseconds for waiting keyboard show up
1082+
Future.delayed(const Duration(milliseconds: 500), _showCaretOnScreen);
1083+
}
10781084
} else {
10791085
widget.focusNode.requestFocus();
10801086
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_quill
22
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
3-
version: 6.1.7
3+
version: 6.1.8
44
#author: bulletjournal
55
homepage: https://bulletjournal.us/home/index.html
66
repository: https://github.com/singerdmx/flutter-quill

0 commit comments

Comments
 (0)