Skip to content

Commit a7377d7

Browse files
Keep overlay focus nodes out of the web View focus sort
Ref: #5127 flutter/flutter#194056
1 parent e5e5761 commit a7377d7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎lib/main.dart‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class _TMailAppState extends State<TMailApp> {
3838
// per build would drop the suspended-route state and skip the restore.
3939
final _selectionHandlesRouteObserver = SelectionHandlesRouteObserver();
4040

41+
final TransitionBuilder _smartDialogBuilder = FlutterSmartDialog.init();
42+
4143
@override
4244
void initState() {
4345
super.initState();
@@ -86,7 +88,10 @@ class _TMailAppState extends State<TMailApp> {
8688
defaultTransition: Transition.noTransition,
8789
initialRoute: AppRoutes.home,
8890
getPages: AppPages.pages,
89-
builder: FlutterSmartDialog.init(),
91+
builder: (context, child) => FocusScope(
92+
// Keeps overlay focus nodes out of the View's focus sort while they are disposed; flutter/flutter#194056.
93+
child: _smartDialogBuilder(context, child),
94+
),
9095
),
9196
);
9297
}

0 commit comments

Comments
 (0)