From fde39b991a41c6a29aaa409fcf70ca20901af3ae Mon Sep 17 00:00:00 2001 From: ManhNTX Date: Fri, 17 Mar 2023 11:26:41 +0700 Subject: [PATCH] TF-1573: add webViewEditorClientY property (cherry picked from commit 8650a6fc2c5e0f91da8abf678538f61b709f7f27) --- lib/features/composer/presentation/composer_controller.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/features/composer/presentation/composer_controller.dart b/lib/features/composer/presentation/composer_controller.dart index 240f4c72b..8dacaa67a 100644 --- a/lib/features/composer/presentation/composer_controller.dart +++ b/lib/features/composer/presentation/composer_controller.dart @@ -1520,13 +1520,14 @@ class ComposerController extends BaseController { if (coordinates?[1] != null && coordinates?[1] != 0) { final coordinateY = max((coordinates?[1] ?? 0) - defaultPaddingCoordinateYCursorEditor, 0); final realCoordinateY = coordinateY + (headerEditorMobileSize?.height ?? 0); + final webViewEditorClientY = max(Get.height - maxKeyBoardHeight - richTextBarHeight, 0) + scrollController.position.pixels; if (scrollController.position.pixels >= realCoordinateY) { scrollController.jumpTo( realCoordinateY.toDouble() - (headerEditorMobileSize?.height ?? 0) / 2, ); } - if ((realCoordinateY) >= max(Get.height - maxKeyBoardHeight - richTextBarHeight, 0) + scrollController.position.pixels) { + if ((realCoordinateY) >= webViewEditorClientY) { scrollController.jumpTo( realCoordinateY.toDouble(), );