Skip to content

Commit

Permalink
Hotfix identity creator view bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Dec 6, 2024
1 parent 47b842d commit 69d7319
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,16 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
),
]
),
_buildHtmlEditorWeb(
context,
controller.contentHtmlEditor,
maxWidth),
ConstrainedBox(
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: 300,
),
child: _buildHtmlEditorWeb(
context,
controller.contentHtmlEditor,
maxWidth),
),
],
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,30 +477,33 @@ class VacationView extends GetWidget<VacationController> with RichTextButtonMixi

Widget _buildMessageHtmlTextEditor(BuildContext context) {
if (PlatformInfo.isWeb) {
return html_editor_browser.HtmlEditor(
key: const Key('vacation_message_html_text_editor_web'),
controller: controller.richTextControllerForWeb.editorController,
htmlEditorOptions: html_editor_browser.HtmlEditorOptions(
hint: '',
darkMode: false,
initialText: controller.vacationMessageHtmlText,
spellCheck: true,
customBodyCssStyle: HtmlUtils.customCssStyleHtmlEditor(direction: AppUtils.getCurrentDirection(context))
),
htmlToolbarOptions: const html_editor_browser.HtmlToolbarOptions(
toolbarType: html_editor_browser.ToolbarType.hide,
defaultToolbarButtons: []),
otherOptions: const html_editor_browser.OtherOptions(height: 150),
callbacks: html_editor_browser.Callbacks(
onChangeSelection: controller.richTextControllerForWeb.onEditorSettingsChange,
onChangeContent: controller.updateMessageHtmlText,
onFocus: () {
KeyboardUtils.hideKeyboard(context);
Future.delayed(const Duration(milliseconds: 500), () {
controller.richTextControllerForWeb.editorController.setFocus();
});
controller.richTextControllerForWeb.closeAllMenuPopup();
}
return ConstrainedBox(
constraints: const BoxConstraints(maxHeight: 300),
child: html_editor_browser.HtmlEditor(
key: const Key('vacation_message_html_text_editor_web'),
controller: controller.richTextControllerForWeb.editorController,
htmlEditorOptions: html_editor_browser.HtmlEditorOptions(
hint: '',
darkMode: false,
initialText: controller.vacationMessageHtmlText,
spellCheck: true,
customBodyCssStyle: HtmlUtils.customCssStyleHtmlEditor(direction: AppUtils.getCurrentDirection(context))
),
htmlToolbarOptions: const html_editor_browser.HtmlToolbarOptions(
toolbarType: html_editor_browser.ToolbarType.hide,
defaultToolbarButtons: []),
otherOptions: const html_editor_browser.OtherOptions(height: 150),
callbacks: html_editor_browser.Callbacks(
onChangeSelection: controller.richTextControllerForWeb.onEditorSettingsChange,
onChangeContent: controller.updateMessageHtmlText,
onFocus: () {
KeyboardUtils.hideKeyboard(context);
Future.delayed(const Duration(milliseconds: 500), () {
controller.richTextControllerForWeb.editorController.setFocus();
});
controller.richTextControllerForWeb.closeAllMenuPopup();
}
),
),
);
} else {
Expand Down

0 comments on commit 69d7319

Please sign in to comment.