TF-1694 Use KeyboardUtils to centralized management show/hide keyboard
(cherry picked from commit e2598476ecdc8c5d16a17dc3c777a34620013c64)
This commit is contained in:
@@ -239,7 +239,7 @@ class VacationController extends BaseController {
|
||||
}
|
||||
|
||||
void saveVacation(BuildContext context) async {
|
||||
FocusScope.of(context).unfocus();
|
||||
KeyboardUtils.hideKeyboard(context);
|
||||
|
||||
if (vacationPresentation.value.isEnabled) {
|
||||
final fromDate = vacationPresentation.value.fromDate;
|
||||
@@ -346,7 +346,7 @@ class VacationController extends BaseController {
|
||||
if (!BuildUtils.isWeb) {
|
||||
richTextControllerForMobile.htmlEditorApi?.unfocus();
|
||||
}
|
||||
FocusScope.of(context).unfocus();
|
||||
KeyboardUtils.hideKeyboard(context);
|
||||
}
|
||||
|
||||
void backToUniversalSettings(BuildContext context) {
|
||||
|
||||
@@ -445,7 +445,7 @@ class VacationView extends GetWidget<VacationController> with RichTextButtonMixi
|
||||
}, onChangeContent: (String? changed) {
|
||||
controller.updateMessageHtmlText(changed);
|
||||
}, onFocus: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
KeyboardUtils.hideKeyboard(context);
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
controller.richTextControllerForWeb.editorController.setFocus();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user