-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: null-safetySupport for Dart's null safety featureSupport for Dart's null safety featurea: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: crashStack traces logged to the consoleStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Sample App
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Sample',
home: Scaffold(
body: Center(
child: TextField(),
),
),
);
}
}Steps to repro:
-
Run the sample app
-
Focus the text field by tapping on it.
-
Press R to hot restart the app. The software keyboard stays.
-
Type a few characters using the software keyboard without re-focusing the text field.
-
Focus the text field. The app throws the following exception:
Performing hot restart...
Restarted application in 849ms.
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following LateError was thrown while dispatching notifications for FocusNode:
LateInitializationError: Field '_instance@393206165' has been assigned during initialization.
When the exception was thrown, this was the stack:
#0 TextInput._instance (package:flutter/src/services/text_input.dart)
#1 TextInput.attach (package:flutter/src/services/text_input.dart:1348:5)
#2 EditableTextState._openInputConnection (package:flutter/src/widgets/editable_text.dart:2014:21)
#3 EditableTextState._openOrCloseInputConnectionIfNeeded (package:flutter/src/widgets/editable_text.dart:2049:7)
#4 EditableTextState._handleFocusChanged (package:flutter/src/widgets/editable_text.dart:2386:5)
#5 ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:243:25)
#6 FocusNode._notify (package:flutter/src/widgets/focus_manager.dart:1052:5)
#7 FocusManager._applyFocusChange (package:flutter/src/widgets/focus_manager.dart:1771:12)
(elided 10 frames from dart:async)
The FocusNode sending notification was:
FocusNode#1b534([PRIMARY FOCUS])
════════════════════════════════════════════════════════════════════════════════════════════════════
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: null-safetySupport for Dart's null safety featureSupport for Dart's null safety featurea: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: crashStack traces logged to the consoleStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team