TF-3944 Automatically close CC, Bcc, ReplyTo input field when clicking outside of it, regardless of whether it has been filled or not
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -586,6 +586,9 @@ class ComposerController extends BaseController
|
||||
}
|
||||
_collapseAllRecipient();
|
||||
autoCreateEmailTag();
|
||||
if (PlatformInfo.isWeb) {
|
||||
_hideCcBccReplyToRecipients();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1359,6 +1362,14 @@ class ComposerController extends BaseController
|
||||
FocusScope.of(context).unfocus();
|
||||
}
|
||||
|
||||
void clickOutsideComposer(BuildContext context) {
|
||||
clearFocus(context);
|
||||
if (PlatformInfo.isWeb) {
|
||||
_collapseAllRecipient();
|
||||
_hideCcBccReplyToRecipients();
|
||||
}
|
||||
}
|
||||
|
||||
void _closeComposerAction({dynamic result, bool closeOverlays = false}) {
|
||||
mailboxDashBoardController.closeComposer(
|
||||
result: result,
|
||||
@@ -1432,6 +1443,12 @@ class ComposerController extends BaseController
|
||||
replyToAddressExpandMode.value = ExpandMode.COLLAPSE;
|
||||
}
|
||||
|
||||
void _hideCcBccReplyToRecipients() {
|
||||
ccRecipientState.value = PrefixRecipientState.disabled;
|
||||
bccRecipientState.value = PrefixRecipientState.disabled;
|
||||
replyToRecipientState.value = PrefixRecipientState.disabled;
|
||||
}
|
||||
|
||||
void _closeSuggestionBox() {
|
||||
if (toEmailAddressController.text.isEmpty) {
|
||||
keyToEmailTagEditor.currentState?.closeSuggestionBox();
|
||||
@@ -1660,6 +1677,9 @@ class ComposerController extends BaseController
|
||||
}
|
||||
_collapseAllRecipient();
|
||||
autoCreateEmailTag();
|
||||
if (PlatformInfo.isWeb) {
|
||||
_hideCcBccReplyToRecipients();
|
||||
}
|
||||
}
|
||||
|
||||
void _onChangeCursorOnMobile(List<int>? coordinates, BuildContext context) {
|
||||
@@ -1791,6 +1811,9 @@ class ComposerController extends BaseController
|
||||
void handleOnMouseDownHtmlEditorWeb() {
|
||||
_collapseAllRecipient();
|
||||
autoCreateEmailTag();
|
||||
if (PlatformInfo.isWeb) {
|
||||
_hideCcBccReplyToRecipients();
|
||||
}
|
||||
}
|
||||
|
||||
FocusNode? getNextFocusOfToEmailAddress() {
|
||||
|
||||
Reference in New Issue
Block a user