Repository: flutter
Issue: Unable to focus TextField widget after scrolling
Labels: a: text input,platform-ios,framework,f: material design,a: tablet,has reproducible steps,P2,found in release: 2.10,found in release: 2.13,team-text-input



## Steps to Reproduce

Use the included code.

1. Focus any text field from the list.
2. Scroll right on the focused text field, after that it gets unfocused.
3. Try to focus any text field (Unable to do that).
4. Notice the scroll view lost bouncing effect.
5. Click on AppBar button to reset the bug state.


<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

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), actions: <Widget>[
          IconButton(
              icon: const Icon(Icons.add_alert),
              onPressed: () {
                showCupertinoDialog(
                    context: context,
                    builder: (context) => alertDialog(context: context));
              })
        ]),
        body: NotificationListener<ScrollUpdateNotification>(
            child: ListView.separated(
                padding: EdgeInsets.zero,
                keyboardDismissBehavior:
                    ScrollViewKeyboardDismissBehavior.onDrag,
                itemBuilder: (context, index) {
                  return TextField();
                },
                separatorBuilder: (context, index) => Container(
                    padding: EdgeInsets.zero, color: Colors.grey, height: 1),
                itemCount: 20),
            onNotification: (notification) {
              return false;
            }));
  }

  Widget alertDialog({required BuildContext context}) {
    return CupertinoAlertDialog(
      title: Text("Title"),
      actions: [
        CupertinoDialogAction(
          isDefaultAction: true,
          child: Text("Cancel"),
          onPressed: () => Navigator.of(context).pop(),
        )
      ],
    );
  }
}

```

</details>

<details>
  <summary>Logs</summary>

flutter doctor -v

```
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.3 21E230 darwin-x64, locale
    en-GB)
    • Flutter version 2.10.4 at /Users/username/Documents/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (3 weeks ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/username/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


https://user-images.githubusercontent.com/4976497/163834840-396c419a-2960-472c-8f37-19b9473face4.mov