fix(web): Cannot typing text when create new folder on Safari for the first time (#4349)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
@@ -55,6 +56,14 @@ class MailboxCreatorController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
if (PlatformInfo.isWeb) {
|
||||
nameInputFocusNode.requestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
listMailboxNameAsStringExist = [];
|
||||
|
||||
@@ -256,17 +256,17 @@ class MailboxCreatorView extends GetWidget<MailboxCreatorController> {
|
||||
),
|
||||
);
|
||||
|
||||
bodyWidget = Center(child: bodyWidget);
|
||||
bodyWidget = GestureDetector(
|
||||
onTap: controller.nameInputFocusNode.unfocus,
|
||||
child: Center(child: bodyWidget),
|
||||
);
|
||||
|
||||
if (PlatformInfo.isMobile) {
|
||||
bodyWidget = GestureDetector(
|
||||
onTap: controller.closeView,
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColor.blackAlpha20,
|
||||
body: GestureDetector(
|
||||
onTap: controller.nameInputFocusNode.unfocus,
|
||||
child: bodyWidget,
|
||||
),
|
||||
body: bodyWidget,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user