Repository navigation
On some devices, native keyboard cannot be closed with back button #66036
Copy link
Copy link
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemse: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specifically
Milestone
Description
Device: Samsung S8, S9
Branch: master
android native keyboard not able to close when we tab hide keyboard and back button in samsung devices with master branch. Works fine with stable branch.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Test',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Keyboard Input')),
body: Center(
child: TextField(),
),
);
}
}
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.22.0-10.0.pre.222, on Microsoft Windows [Version 10.0.18362.1082], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] IntelliJ IDEA Community Edition (version 2019.3)
[√] VS Code (version 1.49.0)
[√] Connected device (3 available)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemse: device-specificOnly manifests on certain devicesOnly manifests on certain devicesengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specifically

Activity
chocolatkey commentedon Sep 17, 2020
I have the same problem, using beta 1.22.0-12.1.pre.
FocusScope.of(context).unfocus();dismisses the keyboard, but as soon as the textfield is selected again, this happens.hamdikahloun commentedon Sep 17, 2020
Hi @ksankumar
Can you provide please the devices info (Android Version, Model Number...)
ksankumar commentedon Sep 17, 2020
@chocolatkey

chocolatkey commentedon Sep 17, 2020
Additional note: did not happen in the previous beta
jason-simmons commentedon Sep 18, 2020
Reproduced this on a Nexus 7
This regressed with 0d8de39
@mdebbar @gspencergoog @chunhtai
TahaTesser commentedon Sep 18, 2020
I cannot reproduce on Realme device
and
@darshankawar tested on S10+, latest master, also doesn't reproduce for him
code sample
flutter doctor -v
[✓] Flutter (Channel master, 1.22.0-10.0.pre.251, on Mac OS X 10.15.6 19G2021 x86_64, locale en-GB) • Flutter version 1.22.0-10.0.pre.251 at /Users/tahatesser/Code/flutter_master • Framework revision d26268bb9e (7 hours ago), 2020-09-18 09:06:26 +0900 • Engine revision 2abe69c608 • Dart version 2.10.0 (build 2.10.0-136.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/tahatesser/Code/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Users/tahatesser/Code/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.0, Build version 12A7209 • CocoaPods version 1.9.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 49.0.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.49.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.14.1 [✓] Connected device (4 available) • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 10 (API 29) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.6 19G2021 x86_64 • Web Server (web) • web-server • web-javascript • Flutter Tools • Chrome (web) • chrome • web-javascript • Google Chrome 85.0.4183.102 • No issues found!Labelling the issue base on #66036 (comment)
[-]Android native back/keyboard close not working[/-][+]On some devices, native keyboard cannot be closed with back button[/+]hamdikahloun commentedon Sep 18, 2020
I cannot reproduce on:
SM-G950F (Samsung Galaxy S8)
SM-F916U (Samsung Galaxy Z Fold 2)
SM-G960F (Samsung Galaxy S9)
code sample
flutter doctor -v
dujianchi commentedon Sep 26, 2020
reproduce on Xiaomi(MIUI12/Android10) and Huawei(EMUI8/Android8).
code:
doctor:
ganeshshirole commentedon Sep 26, 2020
Same issue is there on beta version please resolve this as soon as possible.
I have to deploy app on playstore
chinmaygarde commentedon Sep 28, 2020
cc @gspencergoog @jason-simmons. We should revert 0d8de39 and cherry pick it into the beta.
jason-simmons commentedon Sep 28, 2020
It looks like this was fixed by 0d945a1
@pcsosinski @christopherfujino That change should be cherry picked.
github-actions commentedon Aug 12, 2021
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.