Repository: flutter
Issue: [iOS][webview_flutter] WebView's content inside PageView is unresponsive after scrolling once
Labels: platform-ios,framework,f: scrolling,p: webview,package,has reproducible steps,P2,team-ios,triaged-ios,found in release: 3.16,found in release: 3.19

### Steps to reproduce

The issue is that within a PageView, using a WebView widget, after scrolling once, it causes the content of the SingleChildScrollView in flutter_web to become unresponsive.




flutterweb code
```
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FlutterWeb',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.blueAccent),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'FlutterWeb  SingleChildScrollView '),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: SingleChildScrollView(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'You have pushed the button this many times:',
              ),
              FilledButton(
                onPressed: _incrementCounter,
                child: Text(
                  '$_counter',
                  style: Theme.of(context).textTheme.headlineMedium,
                ),
              ),
              Container(
                height: 2000,
                width: 200,
                color: Colors.red,
              )
            ],
          ),
        ),
      ),
    );
  }
}

```
flutter code
**dependencies
 webview_flutter: 4.4.3**
```
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'package:webview_flutter_wkwebview/webview_flutter_wkwebview.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  late final WebViewController _controller;

  @override
  void initState() {
    super.initState();
    late final PlatformWebViewControllerCreationParams params;
    if (WebViewPlatform.instance is WebKitWebViewPlatform) {
      params = WebKitWebViewControllerCreationParams(
        allowsInlineMediaPlayback: true,
        mediaTypesRequiringUserAction: const <PlaybackMediaTypes>{},
      );
    } else {
      params = const PlatformWebViewControllerCreationParams();
    }

    final WebViewController controller =
        WebViewController.fromPlatformCreationParams(params);

    _controller = controller;

    _controller.loadRequest(Uri.parse('http://10.246.22.204:8000'));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: Text(widget.title),
        ),
        body: PageView(
          children: [Web(controller: _controller), Text('data')],
        ));
  }
}

class Web extends StatefulWidget {
  const Web({
    super.key,
    required WebViewController controller,
  }) : _controller = controller;

  final WebViewController _controller;

  @override
  State<Web> createState() => _WebState();
}

class _WebState extends State<Web> with AutomaticKeepAliveClientMixin<Web> {
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return WebViewWidget(
      controller: widget._controller,
    );
  }

  @override
  // TODO: implement wantKeepAlive
  bool get wantKeepAlive => true;
}
```






### Expected results

The buttons within the SingleChildScrollView in flutter_web become unresponsive after scrolling on iOS, while the functionality remains normal on Android.

### Actual results

The content within the SingleChildScrollView needs to function properly.







### Code sample

<details open><summary>Code sample</summary>
https://github.com/LoveRain1997/webview_bug
</details>

1.
To launch Flutter web code, follow these steps:
>  flutter run -d web-server --web-port 8000 --web-hostname 0.0.0.0  

2. 2.To obtain the local area network (LAN) IP address of the current machine, for example, http://192.168.1.1:8000/, and replace this IP address in the code at line 55 of main_webview.dart with the obtained IP address.

3.
To launch Flutter code 
>  flutter run --release   -t lib/main_webview.dart      


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/flutter/flutter/assets/5773060/8be5c8b1-74f9-468a-bd81-aff6058d36ac

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

[✓] Flutter (Channel stable, 3.16.5, on macOS 13.5.2 22G91 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] Connected device (4 available)                                                                                                                                                                           [!] Network resources                   ⣾
    ✗ A network error occurred while checking "https://maven.google.com/": Operation timed out

! Doctor found issues in 1 category.


</details>