Repository navigation
AutofillGroup does not autofill all related fields in semantics mode #180652
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: releaseChallenges faced when attempting to productionize an appChallenges faced when attempting to productionize an appa: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform team
Description
Issue Detail
When using AutofillGroup with multiple related input fields, autofill only populates the initially focused field. Other fields within the same AutofillGroup are not automatically filled, even when they have valid autofill hints and are expected to be completed together by the platform.
Steps to reproduce
- Save form data on the device (any multi-field form)
- Open the app and focus on one field
- Select an autofill suggestion
- Observe that only the focused field is populated
Expected results
When selecting an autofill suggestion:
All relevant fields within the same AutofillGroup should be autofilled
Autofill should behave consistently with native platform expectations
Actual results
Only the currently focused field is autofilled
Other fields inside the same AutofillGroup remain empty
User must manually enter remaining values or click on each field to auto fill remaining fields in same
Code sample
Code sample
AutofillGroup(
child: Column(
children: [
TextFormField(
autofillHints: const [
AutofillHints.username,
],
decoration: const InputDecoration(
labelText: 'Field A',
),
),
const SizedBox(height: 16),
TextFormField(
autofillHints: const [
AutofillHints.password,
],
obscureText: true,
decoration: const InputDecoration(
labelText: 'Field B',
),
onFieldSubmitted: (_) {
TextInput.finishAutofillContext();
},
),
],
),
);
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.35.5, on macOS 14.7.6 23H626 darwin-arm64, locale en-NL) [820ms]
• Flutter version 3.35.5 on channel stable at /Users/umarghaffarold/Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ac4e799d23 (3 months ago), 2025-09-26 12:05:09 -0700
• Engine revision d3d45dcf25
• Dart version 3.9.2
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging
[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1) [7.6s]
• Android SDK at /Users/umarghaffarold/Library/Android/sdk
• Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
• Platform android-36, build-tools 36.1.0-rc1
• ANDROID_HOME = /Users/umarghaffarold/Library/Android/sdk
• Java binary at: /Users/umarghaffarold/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [2.2s]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [9ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2025.1) [8ms]
• Android Studio at /Users/umarghaffarold/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 21.0.7+-13880790-b1038.58)
[✓] Connected device (2 available) [6.8s]
• macOS (desktop) • macos • darwin-arm64 • macOS 14.7.6 23H626 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 143.0.7499.192
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources [1,197ms]
• All expected network resources are available.
<!-- Failed to upload "Untitled.mp4" -->
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: releaseChallenges faced when attempting to productionize an appChallenges faced when attempting to productionize an appa: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform team
Activity
fayzan101 commentedon Jan 7, 2026
This is expected behavior on Flutter (especially on Android). Currently, AutofillGroup only autofills the focused field. Other fields in the group are not automatically filled due to platform limitations.
Workarounds:
Ensure correct autofillHints are set for all fields.
Call TextInput.finishAutofillContext() after the last field.
On Android, you may need to manually propagate values to other fields if full autofill is required.
Upgrading Flutter to the latest stable version may improve multi-field autofill behavior.
Umar888 commentedon Jan 8, 2026
It is happening on flutter web for me right now, also added TextInput.finishAutofillContext() after last field, but no success
darshankawar commentedon Jan 9, 2026
@Umar888 Since you mentioned that the reported behavior is occuring on web for you, please check if this resembles your case or not.
Umar888 commentedon Jan 10, 2026
No, because on my local autofill is working fine. But when we release, on browser auto fill is not working
darshankawar commentedon Jan 12, 2026
Keeping issue open and labeling for team's tracking.
9 remaining items
Umar888 commentedon Jan 16, 2026
@flutter-zl , can you please try on Flutter (Channel stable, 3.35.5)
This is my application URL where I deployed : https://dev.dashboard.knipklok.nl/shop/login
Umar888 commentedon Jan 16, 2026
@flutter-zl this is my code sample, I am using
Then this is password input field class
Umar888 commentedon Jan 21, 2026
I switched to master channel, but it is not working in my case
flutter-zl commentedon Jan 21, 2026
I can confirm that It is not working when semantic is enabled.
Umar888 commentedon Jan 21, 2026
@flutter-zl after disabling semantics it is still no working
AutofillGroup( key: controller.autoFillKeyB, child: Column( mainAxisSize: MainAxisSize.min, children: [ ExcludeSemantics( child: TextFormField( autofillHints: const [ AutofillHints.username, ], controller: controller.mixedEmailController, decoration: const InputDecoration( labelText: 'Field A', ), ), ), const SizedBox(height: 16), ExcludeSemantics( child: TextFormField( autofillHints: const [ AutofillHints.password, ], controller: controller.mixedPasswordController, obscureText: true, decoration: const InputDecoration( labelText: 'Field B', ), onFieldSubmitted: (_) { TextInput.finishAutofillContext(); }, ), ), ], ), )flutter-zl commentedon Jan 21, 2026
@Umar888 , in your app, have you enabled semantic in your main function? the auto fill works if SemanticsBinding.instance.ensureSemantics() is deleted.
import 'package:flutter/semantics.dart';
void main() {
runApp(const MyApp());
SemanticsBinding.instance.ensureSemantics();
}
Umar888 commentedon Jan 21, 2026
@flutter-zl no I didn't add anything like this
SemanticsBinding.instance.ensureSemantics();flutter-zl commentedon Jan 21, 2026
Please check https://flutter-demo-06-before.web.app/.
The autofill works for both fields when SemanticsBinding.instance.ensureSemantics() is not added.
If I add it, the issue occurs.
yjbanov commentedon Apr 28, 2026
Just a bit of background. We never really implemented group form autofill in semantics mode (there was an attempt but it never got over the finish line). So this needs to be implemented.
[-]AutofillGroup does not autofill all related fields[/-][+]AutofillGroup does not autofill all related fields in semantics mode[/+][web] Autofill all AutofillGroup fields in semantics mode (flutter#18…
github-actions commentedon Aug 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.