Recalculate focus when showing keyboard

pull/1032/head
li3317 2 years ago
parent f66145b153
commit 65c38a8d47
  1. 3
      CHANGELOG.md
  2. 8
      lib/src/widgets/raw_editor.dart
  3. 2
      pubspec.yaml

@ -1,3 +1,6 @@
# [6.1.8]
* Recalculate focus when showing keyboard.
# [6.1.7] # [6.1.7]
* Add czech localizations. * Add czech localizations.

@ -1073,8 +1073,14 @@ class RawEditorState extends EditorState
return; return;
} }
if (_hasFocus) { if (_hasFocus) {
final keyboardAlreadyShown = _keyboardVisible;
openConnectionIfNeeded(); openConnectionIfNeeded();
_showCaretOnScreen(); if (keyboardAlreadyShown) {
_showCaretOnScreen();
} else {
/// delay 500 milliseconds for waiting keyboard show up
Future.delayed(const Duration(milliseconds: 500), _showCaretOnScreen);
}
} else { } else {
widget.focusNode.requestFocus(); widget.focusNode.requestFocus();
} }

@ -1,6 +1,6 @@
name: flutter_quill name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 6.1.7 version: 6.1.8
#author: bulletjournal #author: bulletjournal
homepage: https://bulletjournal.us/home/index.html homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save