TF-1152 Make better manage initial cursor position in composer

This commit is contained in:
dab246
2022-12-09 19:18:37 +07:00
committed by Dat H. Pham
parent d9c0ded54d
commit ba0217f2fb
6 changed files with 77 additions and 21 deletions
@@ -473,6 +473,8 @@ class ComposerView extends GetWidget<ComposerController>
controller.listEmailAddressType,
expandMode: controller.toAddressExpandMode.value,
controller: controller.toEmailAddressController,
focusNode: controller.toAddressFocusNode,
autoDisposeFocusNode: false,
isInitial: controller.isInitialRecipient.value)
..addOnFocusEmailAddressChangeAction((prefixEmailAddress, focus) => controller.onEmailAddressFocusChange(prefixEmailAddress, focus))
..addOnShowFullListEmailAddressAction((prefixEmailAddress) => controller.showFullEmailAddress(prefixEmailAddress))
@@ -544,6 +546,7 @@ class ComposerView extends GetWidget<ComposerController>
child: (TextFieldBuilder()
..key(const Key('subject_email_input'))
..cursorColor(AppColor.colorTextButton)
..addFocusNode(controller.subjectEmailInputFocusNode)
..onChange((value) => controller.setSubjectEmail(value))
..textStyle(const TextStyle(color: Colors.black, fontSize: 15, fontWeight: FontWeight.normal))
..textDecoration(const InputDecoration(contentPadding: EdgeInsets.zero, border: InputBorder.none))
@@ -671,7 +674,7 @@ class ComposerView extends GetWidget<ComposerController>
child: HtmlEditor(
key: const Key('composer_editor_web'),
controller: controller.richTextWebController.editorController,
htmlEditorOptions: HtmlEditorOptions(
htmlEditorOptions: const HtmlEditorOptions(
hint: '',
darkMode: false,
customBodyCssStyle: bodyCssStyleForEditor),