TF-2475 Handle format style rich text in composer
This commit is contained in:
@@ -454,8 +454,7 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
richTextMobileTabletController?.richTextController.onCreateHTMLEditor(
|
||||
editorApi,
|
||||
onEnterKeyDown: _onEnterKeyDown,
|
||||
context: context,
|
||||
onFocus: _onEditorFocusOnMobile,
|
||||
onFocus: () => _onEditorFocusOnMobile(context),
|
||||
onChangeCursor: (coordinates) {
|
||||
_onChangeCursorOnMobile(coordinates, context);
|
||||
},
|
||||
@@ -1319,7 +1318,6 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
log('ComposerController::clearFocus:');
|
||||
if (PlatformInfo.isMobile) {
|
||||
htmlEditorApi?.unfocus();
|
||||
KeyboardUtils.hideSystemKeyboardMobile();
|
||||
}
|
||||
FocusScope.of(context).unfocus();
|
||||
}
|
||||
@@ -1508,7 +1506,7 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
}
|
||||
_closeSuggestionBox();
|
||||
if (PlatformInfo.isMobile) {
|
||||
htmlEditorApi?.unfocus();
|
||||
richTextMobileTabletController?.richTextController.hideRichTextView();
|
||||
}
|
||||
} else {
|
||||
switch(prefixEmailAddress) {
|
||||
@@ -1647,7 +1645,13 @@ class ComposerController extends BaseController with DragDropFileMixin {
|
||||
_closeComposerAction();
|
||||
}
|
||||
|
||||
void _onEditorFocusOnMobile() {
|
||||
Future<void> _onEditorFocusOnMobile(BuildContext context) async {
|
||||
if (PlatformInfo.isAndroid) {
|
||||
FocusScope.of(context).unfocus();
|
||||
await Future.delayed(
|
||||
const Duration(milliseconds: 300),
|
||||
richTextMobileTabletController?.richTextController.showDeviceKeyboard);
|
||||
}
|
||||
_collapseAllRecipient();
|
||||
_autoCreateEmailTag();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user