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:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.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
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
listMailboxNameAsStringExist = [];
|
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) {
|
if (PlatformInfo.isMobile) {
|
||||||
bodyWidget = GestureDetector(
|
bodyWidget = GestureDetector(
|
||||||
onTap: controller.closeView,
|
onTap: controller.closeView,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColor.blackAlpha20,
|
backgroundColor: AppColor.blackAlpha20,
|
||||||
body: GestureDetector(
|
body: bodyWidget,
|
||||||
onTap: controller.nameInputFocusNode.unfocus,
|
|
||||||
child: bodyWidget,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user