New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save password prompt dismiss is pushing UI up and down #112281
Comments
Thanks for the report @rsp-84 Can you try, after entering password, tap on |
@darshankawar – When pressing done the issue still seems to persist. In this simplified example, I have removed almost everything to display the issue with the base Flutter elements. When pressing done to simulate submitting a login form and then proceeding to the next page, the issue still occurs. This would probably be the most common user flow: fill out the login form, submit it, and proceed directly to the logged-in page. Here is another video using the
|
save_pw_issue_2.MP4 |
@rsp-84
Can you provide updated |
Device: It is an iPhone X on iOS 15.7 |
Thanks for the update @rsp-84. For some reason, I am unable to see the save password option on next screen as shown below even though I have RPReplay-Final1664517627.MP4One of my colleagues is also seeing same behavior on different iOS device: RPReplay_Final1664516765.MP4I am going ahead and keeping this issue open based on the report. |
/cc @LongCatIsLooong |
@darshankawar I believe in order for it to work on iOS and receive the prompt, you need to have an |
Thanks for the tip @rsp-84. Yes, that was missing from my project. Adding it and then running the code sample, on latest stable and master, with which I am now able to replicate the behavior. RPReplay-Final1664781279.MP4stable, master flutter doctor -v
|
we are facing the same issue too , its happening when resizeToAvoidBottomInset for scaffold is set to true |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
I'm also facing this with |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
Same here... Flutter 3.10.5 additionally, is it possible to only show the prompt if successfully logged? from tests I have done, the prompt is displayed whenever the soft keyboard is dismissed... |
This comment was marked as duplicate.
This comment was marked as duplicate.
In case someone needs a workaround I found something but it's kind of specific for my scenario. I'm designing a login form and I want to save credentials only on success. I achieved this but when going to another screen this bug was causing the jumpy animation. I was able to "solve" it by using provider (I guess any state manager will do). Steps I did:
More info on this thread of SO: |
I was facing the same issue. @aarcoraci your workaround worked 💪 |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Hi everyone! I've made the following observations:
To reproduce enter some text in both email and password fields and press "done" on the keyboard in the second field. Code sampleexpand to view the code sampleimport 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
final TextEditingController controller1 = TextEditingController();
final TextEditingController controller2 = TextEditingController();
@override
void dispose() {
controller1.dispose();
controller2.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold( // Replace Scaffold with Material to fix glitch.
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const Text('Login (Without Scaffold)'),
AutofillGroup(
child: Column(
children: <Widget>[
TextField(
controller: controller1,
autofillHints: const <String>[AutofillHints.username],
),
TextField(
controller: controller2,
autofillHints: const <String>[AutofillHints.password],
),
],
),
),
],
),
),
);
}
} Without
|
flutter: MediaQuery.of(context).viewInsets.bottom: 300.921851335732
flutter: MediaQuery.of(context).viewInsets.bottom: 0.0 |
This regressed in flutter/engine#29281. I'm working on a fix. |
…50364) fixes [Save password prompt dismiss is pushing UI up and down](flutter/flutter#112281) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @OverRide Widget build(BuildContext context) { return const MaterialApp( debugShowCheckedModeBanner: false, home: HomePage(), ); } } class HomePage extends StatefulWidget { const HomePage({super.key}); @OverRide State<HomePage> createState() => _HomePageState(); } class _HomePageState extends State<HomePage> { final TextEditingController controller1 = TextEditingController(); final TextEditingController controller2 = TextEditingController(); @OverRide void dispose() { controller1.dispose(); controller2.dispose(); super.dispose(); } @OverRide Widget build(BuildContext context) { return Scaffold( // Replace Scaffold with Material to fix glitch. body: Center( child: Column( mainAxisSize: MainAxisSize.min, children: <Widget>[ const Text('Login (Without Scaffold)'), AutofillGroup( child: Column( children: <Widget>[ TextField( controller: controller1, autofillHints: const <String>[AutofillHints.username], ), TextField( controller: controller2, autofillHints: const <String>[AutofillHints.password], ), ], ), ), ], ), ), ); } } ``` </details> ### Before https://github.com/flutter/engine/assets/48603081/dfe36616-e1dd-4c6c-95b0-e4bd89bd3a6a ### After https://github.com/flutter/engine/assets/48603081/cfb15252-10cd-4521-a1ef-2cace0004588 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Unfortunately, the fix for this issue is reverted in flutter/engine#50760 as it is causing a regression for keyboard created by a third-party package. I might work on a new fix which would address third-party package keyboards in the future. If anyone wants to takeover and fix this in the meantime, please feel free. |
@TahaTesser Hello! Could you please provide more explanation about issues with third-parties? I think now if anyone wants to fix this, they can't be sure that it won't break something again. |
Steps to Reproduce
** On the machine I ran, it currently has flutter 2 however, when upgraded to flutter 3, the same behavior is present. And appears only to affect iOS.
Expected results: The prompt should dismiss from the widget leaving the underlying page unmodified.
Actual results: After being dismissed, the contents on the widget is being pushed up and down.
Code sample
Simplified widgets to show the issue:[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /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 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.71.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.48.0
[✓] Connected device (2 available)
• iPhone (mobile) • ios • iOS 15.7 19H12
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.125
[✓] HTTP Host Availability
• All required HTTP hosts are available
save_pw_issue.MP4
The text was updated successfully, but these errors were encountered: