-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Steps to Reproduce
- On a computer running Windows, Open Windows Settings
- Search for Clipboard
- Enable Clipboard History as seen in this image.
- Create a new Flutter application.
- Replace main.dart code with the below Code.
- Selected Chrome as the device
- Copy some text into your clipboard
- Run in the application using Debug mode (Start Debugging in VS Code)
- Using the mouse, click the TextFormField
- Press Windows Logo Key + Alt.
- Click the text you copied into the clipboard
- App will freeze.
If you repeat the above steps and run the application without debugging, assert messages will appear in the terminal Debug Console.
NOTE: Windows Clipboard History feature works normally when running on Windows and Andriod.
Expected results:
Text is pasted into the TextFormField
Actual results:
Chrome application freezes. You'll be unable to edit any text. Nothing appears in the terminal Debug Console. There have been times when I had to restart VS Code after this happens because the keyboard can't be used to edit code.
Code
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Chrome Issue With Windows Clipboard History',
theme: ThemeData(primarySwatch: Colors.blue),
home: const MyHomePage(title: 'Chrome Issue With Windows Clipboard History'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextFormField(),
],
),
),
);
}
}
Logs
This Chrome log is only rendered when running in NON-DEBUG mode. In DEBUG mode, applicaiton freezes, no log it outputted.
Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/keyboard_binding.dart:352:16
result != null
"Invalid modifier location: Control, 0"
at Object.throw_ [as throw] (http://localhost:64409/dart_sdk.js:5063:11)
at Object.assertFailed (http://localhost:64409/dart_sdk.js:4988:15)
at http://localhost:64409/dart_sdk.js:170042:39
at _engine.KeyboardConverter.new.[_handleEvent] (http://localhost:64409/dart_sdk.js:170048:25)
at _engine.KeyboardConverter.new.handleEvent (http://localhost:64409/dart_sdk.js:170134:27)
at http://localhost:64409/dart_sdk.js:169775:76
at loggedHandler (http://localhost:64409/dart_sdk.js:169752:18)
Error: Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/keyboard_binding.dart:352:16
result != null
"Invalid modifier location: Control, 0"
at Object.throw_ [as throw] (http://localhost:64409/dart_sdk.js:5063:11)
at Object.assertFailed (http://localhost:64409/dart_sdk.js:4988:15)
at http://localhost:64409/dart_sdk.js:170042:39
at _engine.KeyboardConverter.new.[_handleEvent] (http://localhost:64409/dart_sdk.js:170048:25)
at _engine.KeyboardConverter.new.handleEvent (http://localhost:64409/dart_sdk.js:170134:27)
at http://localhost:64409/dart_sdk.js:169776:74
at loggedHandler (http://localhost:64409/dart_sdk.js:169752:18)
>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19043.1466], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.9)
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.63.2)
[√] Connected device (3 available)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
