From d8e9fff15f1b83f8c6aa8a51fbe9d102329621ff Mon Sep 17 00:00:00 2001 From: dab246 Date: Fri, 10 Sep 2021 14:27:17 +0700 Subject: [PATCH] TF-74 Fix bug keep only one input focus on composer at one time --- .../presentation/views/text/text_field_builder.dart | 1 + .../composer/presentation/composer_view.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/lib/presentation/views/text/text_field_builder.dart b/core/lib/presentation/views/text/text_field_builder.dart index adbcbd026..bcf87b2dc 100644 --- a/core/lib/presentation/views/text/text_field_builder.dart +++ b/core/lib/presentation/views/text/text_field_builder.dart @@ -60,6 +60,7 @@ class TextFieldBuilder { textInputAction: _textInputAction, decoration: _inputDecoration, maxLines: _maxLines, + keyboardAppearance: Brightness.light, style: _textStyle ?? TextStyle(color: AppColor.textFieldTextColor), obscureText: _obscureText ?? false, ); diff --git a/lib/features/composer/presentation/composer_view.dart b/lib/features/composer/presentation/composer_view.dart index 96e1f7ba4..a29ad1a04 100644 --- a/lib/features/composer/presentation/composer_view.dart +++ b/lib/features/composer/presentation/composer_view.dart @@ -141,13 +141,13 @@ class ComposerView extends GetWidget { initialText: controller.getEmailActionType() != EmailActionType.compose ? controller.getBodyEmailQuotedAsHtml(context, htmlMessagePurifier) : null, - disableHorizontalScroll: false, - supportZoom: true, - horizontalScrollBarEnabled: true, shouldEnsureVisible: true), - otherOptions: OtherOptions( - decoration: BoxDecoration(), - height: 600) + otherOptions: OtherOptions(decoration: BoxDecoration()), + callbacks: Callbacks( + onFocus: () { + FocusScope.of(context).unfocus(); + } + ), )); } } \ No newline at end of file