Repository navigation
Closed
Labels
👍Issue needs retriaging to evaluate its popularityP2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsassigned for triageissue is assigned to a domain expert for further triagebrowser: chrome-androidonly manifests in Chrome on Androidbrowser: safari-iosonly manifests in Safari on iOScustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 3.10Found to occur in 3.10found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform team
Description
Steps to Reproduce
Create a simple app where text editing aligns at the bottom.
- After creating the app, upload it on the web and open the Flutter app on the iPhone mobile browser.
- Execute the command "flutter build web --web-renderer canvaskit" on the code sample and upload it to the server. You can also check it on https://api.de-team.com/flutter/.
- Open the app on the mobile browser. For example, open it on Safari. Tap on the blue editable field.
Expected results:
The expectation is that the keyboard will show up and the blue field will align above the keyboard.
Actual results:
However, the actual results are that all content has bottom insets and there exists extra space between the keyboard and the app content widget. You need to fix this issue to ensure the app performs as expected.
Sample code
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
builder: (context, child) => const MyApp(),
));
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<StatefulWidget> createState() {
return _MyAppState();
}
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.blueAccent,
child: Column(
children: [
const Spacer(),
Text(
'Media query inset vertical ${MediaQuery.of(context).viewInsets.vertical}',
style: const TextStyle(fontSize: 14, color: Colors.black),
),
Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.vertical),
child: Container(
padding: const EdgeInsets.all(16),
color: Colors.indigo,
child: EditableText(
controller: TextEditingController(),
focusNode: FocusNode(),
style: const TextStyle(fontSize: 14, color: Colors.black),
cursorColor: Colors.white,
backgroundCursorColor: Colors.transparent,
),
),
),
],
),
);
}
}Another example, same result
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
builder: (context, child) => const MyApp(),
));
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<StatefulWidget> createState() {
return _MyAppState();
}
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
const Spacer(),
Container(
padding: const EdgeInsets.all(16),
color: Colors.indigo,
child: EditableText(
controller: TextEditingController(),
focusNode: FocusNode(),
style: const TextStyle(fontSize: 14, color: Colors.black),
cursorColor: Colors.white,
backgroundCursorColor: Colors.transparent,
),
),
],
),
);
}
}Details
flutter doctor -v
[✓] Flutter (Channel stable, 3.7.9, on macOS 13.2.1 22D68 darwin-arm64, locale en-RU)
• Flutter version 3.7.9 on channel stable at /Users/rain/Dev/sdk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 62bd79521d (6 days ago), 2023-03-30 10:59:36 -0700
• Engine revision ec975089ac
• Dart version 2.19.6
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/rain/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.12.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• 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.15+0-b2043.56-8887301)
[✓] IntelliJ IDEA Community Edition (version 2022.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 72.1.4
• Dart plugin version 223.8888
[✓] VS Code (version 1.77.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • 6072A3F4-985F-4748-AC2E-9E71BE2C2C60 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.2.1 22D68 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.146
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
flutter_keyboard_error.mov
Reacted by Git-GA, Damian Curzydlo, TheLastFlame, Sean Steinke, Matt Perren, Mohammed CHAHBOUN, rn7cvj, Amir Panahandeh, Jannis Nikou, rebecca-fundy and 94 more
Reacted by lisovyk, Matheus Campanhola Santos and t3h32eKK
Metadata
Metadata
Assignees
Labels
👍Issue needs retriaging to evaluate its popularityP2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsassigned for triageissue is assigned to a domain expert for further triagebrowser: chrome-androidonly manifests in Chrome on Androidbrowser: safari-iosonly manifests in Safari on iOScustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 3.10Found to occur in 3.10found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-webOwned by Web platform team
Activity
darshankawar commentedon Apr 6, 2023
Thanks for the detailed report @NelepovDmitry
I tried the sample code on physical device (iPhone 6s, OS 15.3.1) in which, the app worked as expected. The keyboard opening and closing is aligned with the text field as shown below:
RPReplay-Final1680785526.MP4
I see that you tried on simulator. Can you try the same on physical device and confirm if you still get same behavior or not ?
NelepovDmitry commentedon Apr 6, 2023
Yes, i have same issue on iPhone 14, iPhone 10, Android Samsung S22 Ultra.
Here is video from Android.
keyboard_bug_android.mp4
darshankawar commentedon Apr 6, 2023
Can you try using this property and see if it helps ? https://api.flutter.dev/flutter/material/Scaffold/resizeToAvoidBottomInset.html
NelepovDmitry commentedon Apr 6, 2023
Already tried (
Looks like keyboard make offset whole viewcontroller or activity.
darshankawar commentedon Apr 10, 2023
Thanks for the update. Are all iphone devices you tried on have OS 16 or lesser ?
NelepovDmitry commentedon Apr 10, 2023
All devices with OS 16+
I will check if i have some device with less OS version.
darshankawar commentedon Apr 11, 2023
Also verified on iOS 16 simulator, but not seem to be replicating the behavior.
Screen.Recording.2023-04-11.at.12.26.38.mov
Execute the command "flutter build web --web-renderer canvaskit", can you try with html rendering mode as well and see what behavior you get ?138 remaining items
ArmandF-Eclipsed commentedon Jan 14, 2026
I can confirm that the issue where white space renders above the keyboard, if the text field is at the bottom of the view, and on Android Web, is still present in the master branch.
I cloned version
3.40.0-1.0.pre-570.---- Update ----
Also happens on some iOS web builds, super inconsistent - Android web is still the most replicatable
mdebbar commentedon Jan 21, 2026
The issue reported by @andy-tmpt-me with the negative insets is identical to #175074 and was fixed in #179581
(still hasn't made it to stable yet).Anyone on the latest master channel can confirm if the issue is fixed or still happening?
@ArmandF-Eclipsed can you try on the master channel (and don't forget to
flutter upgrade)? If the issue is still happening, could you share more details likeflutter doctor -voutput, code sample, and a video recording of the issue? Thanks!Edit: I forgot that the fix was actually cherry-picked to the stable release
3.38.6.andy-tmpt-me commentedon Jan 21, 2026
I just tested from the latest published Flutter on chrome on a Pixel 8 (actual device) and the issue resolved for me!
ArmandF-Eclipsed commentedon Jan 22, 2026
After pulling the latest master version (v3.41.0-1.0.pre-212), I can confirm that the issue is resolved, provided that you disable the
resizeToAvoidBottomInsetfor Android web in the scaffold.mdebbar commentedon Jan 22, 2026
Thanks @andy-tmpt-me and @ArmandF-Eclipsed for confirming!
sero583 commentedon Jan 22, 2026
A bit late to the party, but I can confirm as well that it works now. Thanks for the fix, @mdebbar!
MrPiou94 commentedon Jan 26, 2026
WhatsApp.Video.2026-01-26.at.18.52.17.mp4
Hello,
I confirm that everything is now working correctly. For anyone who might still be experiencing issues, I decided to delete my Flutter directory and start with a clean installation. Everything is working perfectly now.
Thank you for your adjustments.
Happy coding to everyone!
github-actions commentedon Feb 10, 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.