[Windows] TextField() can't enter text after regaining focus in Windows program.

This issue has been tracked since 2022-09-23.

Steps to Reproduce

  1. Add a TextField()to the page. Text can be entered normally using the keyboard.
  2. Then switch to another program, But don't close the Flutter program.
  3. Switch back to the Flutter program, TextField() cannot continue to use the keyboard to enter text.
danagbemava-nc wrote this answer on 2022-09-23

Hi @wxw-9527, please provide the output of flutter doctor -v.

Can you also share a recording that captures this issue?

Please also provide the code sample that you reproduce this issue with.

I attempted to reproduce this but it doesn't reproduce for me.

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const SimpleSample());

class SimpleSample extends StatelessWidget {
  const SimpleSample({Key? key}) : super(key: key);
  Widget build(BuildContext context) {
    return MaterialApp(theme: ThemeData(), home: const PopupView());

class PopupView extends StatefulWidget {
  const PopupView({Key? key}) : super(key: key);

  State<PopupView> createState() => _PopupViewState();

class _PopupViewState extends State<PopupView> {
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(child: TextField(),)
wxw-9527 wrote this answer on 2022-09-26

I am very sorry that it was my mistake.
When I disable windows title bar, removed a line of code SetWindowLongPtr(window, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams)) in win32_window.cpp.

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2022-10-04
Star Count 145499
Watcher Count 3567
Fork Count 23393
Issue Count 11206


Issue Title Created Date Updated Date