Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Description
Steps to reproduce
- Run a Flutter Web app on iOS Safari.
- Use a password
TextFieldwith:
autofillHints: const [AutofillHints.password],
obscureText: obscureText,- Focus the password field. Keyboard appears.
- Toggle obscureText.
- Unfocus the field.
- Tap the password field again.
Expected results
The field regains focus and the keyboard appears.
Actual results
The field appears focused, but the keyboard never appears again.
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MaterialApp(home: ReproPage()));
}
class ReproPage extends StatefulWidget {
const ReproPage({super.key});
@override
State<ReproPage> createState() => _ReproPageState();
}
class _ReproPageState extends State<ReproPage> {
bool obscureText = true;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(24),
child: AutofillGroup(
child: Column(
children: [
const TextField(
autofillHints: [AutofillHints.username],
decoration: InputDecoration(
labelText: 'Username',
),
),
TextField(
autofillHints: const [AutofillHints.password],
obscureText: obscureText,
decoration: InputDecoration(
labelText: 'Password',
suffixIcon: IconButton(
onPressed: () {
setState(() {
obscureText = !obscureText;
});
},
icon: const Icon(Icons.visibility),
),
),
),
],
),
),
),
);
}
}Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2026-09-24.at.10.44.19.mov
Logs
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.47.5, on macOS 26.6.1 25G76 darwin-arm64, locale en-VN) [632ms]
• Flutter version 3.47.5 on channel stable at /Users/simon/.puro/envs/stable/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 6a19cca564 (6 days ago), 2026-09-17 14:13:22 -0400
• Engine revision af7e796e16
• Dart version 3.13.4
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use,
enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[✓] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [956ms]
• Android SDK at /Users/simon/Library/Android/sdk
• Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
• Platform android-37.2-beta2, build-tools 37.0.0
• ANDROID_HOME = /Users/simon/Library/Android/sdk
• Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment Homebrew (build 17.0.15+0)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 26.4) [1,241ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17E192
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [14ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google ChromeMetadata
Metadata
Assignees
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Activity
simonpham commentedon Sep 24, 2026
Confirmed on:
Flutter 3.44.9
Flutter 3.47.5
Workaround: Removing autofillHints fixes the issue.
This looks related to #192102, but that issue reproduces without autofill.
[web] Preserve active autofill form across text input configuration u…
[web] Preserve active autofill form across text input configuration u…
simonpham commentedon Sep 24, 2026
this happens on Android (Chrome) as well.
puneetkukreja98 commentedon Sep 24, 2026
@simonpham Thanks for reporting the issue. Even after removing autofillgroup and autofillhints it still reproduces on latest stable.
Tested on ios 26.5 web (iphone 17 simulator).
I am closing this as a duplicate of #192102.
Code sample:
flutter doctor -v:
[-][web][iOS Safari] Password field cannot reopen keyboard after toggling obscureText with autofillHints[/-][+][web] Password field cannot reopen keyboard after toggling obscureText with autofillHints[/+]simonpham commentedon Sep 24, 2026
hi @puneetkukreja98, it does work by removing only the
autofillHintsof the passwordTextField:github-actions commentedon Oct 8, 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.[web] Preserve active autofill form across text input configuration u…
[web] Preserve active autofill form across text input configuration u…