Skip to content

[webview_flutter] Autofill doesn't work #92165

@MihaMarkic

Description

@MihaMarkic

Steps to Reproduce

  1. Run sample provided in this comment.

Expected results:

If Autofill is configured properly, it should suggest e-mail. It does with the same page both in natively hosted WebView and in browser (tested on Android 11 emulator and 10 on a device)

Actual results:

No autofill suggestions.

Code sample
<input autocomplete="email" id="email" name="email" type="email">

(copied from steps to reproduce hyperlink)

import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() => runApp(MaterialApp(home: WebViewExample()));

class WebViewExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();

    return Scaffold(
      appBar: AppBar(),
      body: WebView(
        initialUrl:
            'data:text/html;base64,PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD48dGl0bGU+VGVzdCBhdXRvIGNvbXBsZXRlPC90aXRsZT48L2hlYWQ+Cjxib2R5PgplbWFpbDoKPGlucHV0IGF1dG9jb21wbGV0ZT0iZW1haWwiIGlkPSJlbWFpbCIgbmFtZT0iZW1haWwiIHR5cGU9ImVtYWlsIj4KPC9ib2R5Pgo8L2h0bWw+Cg==',
        javascriptMode: JavascriptMode.unrestricted,
      ),
    );
  }
}
Logs
Analyzing android...
No issues found! (ran in 0.7s)
[✓] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19043.1288], locale sl-SI)
    • Flutter version 2.5.2 at C:\Users\MYNAME\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 3595343e20 (3 weeks ago), 2021-09-30 12:58:18 -0700
    • Engine revision 6ac856380f
    • Dart version 2.14.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\MYNAME\AppData\Local\Android\Sdk
    • Platform android-31, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\MYNAME\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Android Studio (version 2020.3)
    • Android Studio at C:\Program Files\Android\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 11.0.10+0-b96-7249189)

[✓] Android Studio
    • Android Studio at C:\Program Files\Android\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
    • android-studio-dir = C:\Program Files\Android\Android Studio\
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.61.1)
    • VS Code at C:\Users\MYNAME\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.27.0

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listcustomer: money (g3)found in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: webviewThe WebView pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions