TF-1679: Support hide keyboard when click add email forward
(cherry picked from commit 3794508a5debc4069f58f0aa5fd4052fb844183c)
This commit is contained in:
+7
@@ -280,6 +280,7 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontWeight: FontWeight.w500))
|
fontWeight: FontWeight.w500))
|
||||||
..onPressActionClick(() {
|
..onPressActionClick(() {
|
||||||
|
_hideKeyboardForMobile();
|
||||||
if (widget.controller?.text.isNotEmpty == true) {
|
if (widget.controller?.text.isNotEmpty == true) {
|
||||||
if (!_isDuplicatedRecipient(widget.controller?.text ?? '')) {
|
if (!_isDuplicatedRecipient(widget.controller?.text ?? '')) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -315,4 +316,10 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
keyToEmailTagEditor.currentState?.resetTextField();
|
keyToEmailTagEditor.currentState?.resetTextField();
|
||||||
keyToEmailTagEditor.currentState?.closeSuggestionBox();
|
keyToEmailTagEditor.currentState?.closeSuggestionBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _hideKeyboardForMobile() {
|
||||||
|
if (!_responsiveUtils.isDesktop(context)) {
|
||||||
|
FocusScope.of(context).unfocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user