fix: android, touch mode, correct cursor input, on soft keyboard shows (#8426)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-06-20 22:18:57 +08:00 committed by GitHub
parent a679e4a5e3
commit 82bf04da81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 15 deletions

View file

@ -721,8 +721,8 @@ class _KeyHelpToolsState extends State<KeyHelpTools> {
if (renderObject is RenderBox) {
final size = renderObject.size;
Offset pos = renderObject.localToGlobal(Offset.zero);
gFFI.cursorModel.keyHelpToolsRect =
Rect.fromLTWH(pos.dx, pos.dy, size.width, size.height);
gFFI.cursorModel.keyHelpToolsVisibilityChanged(
Rect.fromLTWH(pos.dx, pos.dy, size.width, size.height));
}
}
@ -734,7 +734,7 @@ class _KeyHelpToolsState extends State<KeyHelpTools> {
inputModel.command;
if (!_pin && !hasModifierOn && !widget.requestShow) {
gFFI.cursorModel.keyHelpToolsRect = null;
gFFI.cursorModel.keyHelpToolsVisibilityChanged(null);
return Offstage();
}
final size = MediaQuery.of(context).size;