Repository: flutter
Issue: [webview_flutter] back button not working when TextField is focused in non-hybrid composition
Labels: platform-android,p: webview,package,has reproducible steps,P3,platform-views: vd,found in release: 2.5,found in release: 2.6,team-android,triaged-android

Hello Flutter team,
I've encountered a possible bug when using the official `webview_flutter` plugin in an app I'm currently developing. When you focus a search field in the shown website you can't use the back button on Android anymore (Only tested on Android). At first it of course closes the opened keyboard, but following back button presses are not registered in any way - in the following this is demonstrated by using the `WillPopScope` widget.

## Steps to Reproduce

Here is a complete `main.dart` to verify the issue:

```dart
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: WillPopScope(
        child: WebView(
          initialUrl: "https://google.com",
        ),
        onWillPop: () async {
          print("Is only printed when no TextField is focused");
          return false;
        },
      ),
    );
  }
}
```

Steps to reproduce with above code:
1. Run App
2. Tap into the search field
3. When cursor is shown, press back button
4. Nothing happens, back button doesn't work
5. Now tap outside of search field
6. Press back button
7. Text is printed, the back button works

Thanks for your help!

EDIT: Using `webview_flutter` version 2.0.3

<details>
  <summary>Logs</summary>

Output of `flutter analyze`
```
Analyzing webview_test...                                       
No issues found! (ran in 1.1s)

```
Output of `flutter doctor -v`
```
[✓] Flutter (Channel stable, 2.0.4, on Linux, locale de_DE.UTF-8)
    • Flutter version 2.0.4 at /opt/flutter
    • Framework revision b1395592de (6 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/thedoctor/Android/Sdk
    • Platform android-30, build-tools 29.0.2
    • ANDROID_HOME = /home/thedoctor/Android/Sdk
    • ANDROID_SDK_ROOT = /home/thedoctor/Android/Sdk
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio
    • Android Studio at /opt/android-studio
    • 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 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.3)
    • IntelliJ at /opt/intellij-idea-ultimate-edition
    • 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

[✓] Connected device (1 available)
    • Phh Treble vanilla (mobile) • 3071RF4001003310 • android-arm64 • Android 10 (API 29)

! Doctor found issues in 1 category.
```

</details>