-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Flutter layout not updated when Large iOS custom keyboard is dismissed. #99951
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
Comments
Hi @coldstar96, thanks for reporting this. Please provide the output of Thank you |
flutter doctor -v
|
Hi @coldstar96, I'm attempting to reproduce but it doesn't seem to occur for me. Kindly check the video below and let me know if I'm missing something RPReplay_Final1647239684.MP4 |
hmm.. I'm not sure if there's additional environment requirements but it seems like @luckysmg was able to repro from flutter/engine#31982. If his change seems reasonable, would you be able to approve it? If this helps, my device is iPhone 13 pro max, iOS 15.3.1 |
Yes, @coldstar96 @danagbemava-nc I can reproduce this issue. Here is demo code. You can try to dismiss keyboard by tapping the blank area in scaffold. Demo codeimport 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: (){
FocusScope.of(context).unfocus();
},
child: Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
title: Text(widget.title),
),
body: Container(
color: Colors.blue.shade100,
child: Column(
children: [
const SizedBox(height: 48),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
child: Text(
'1. Change iOS keyboard to Bitmoji or Slyder keyboard.\n'
'2. Tap on the button below.\n'
'3. Navigate back to previous route.\n'
'4. Check that shaded blue(Scaffold.body) not covering entire screen.\n'
'5. Compare the behavior with OS keyboard',
style: TextStyle(fontSize: 20),
),
),
const TextField(autofocus: true),
const Spacer(),
ElevatedButton(
onPressed: () {
FocusScope.of(context).unfocus();
Navigator.of(context).push(CupertinoPageRoute(
builder: (context) {
return const MyHomePage(title: 'Another Page');
},
));
},
child: const Text('Hello', style: TextStyle(fontSize: 30)),
)
],
),
),
bottomNavigationBar: BottomNavigationBar(
items: [Icons.abc, Icons.train]
.map((e) => BottomNavigationBarItem(icon: Icon(e), label: 'hi'))
.toList(),
),
),
);
}
}
|
Hmm, you both appear to be using a variation of iPhone 13, perhaps this only affects newer iphones? videoRPReplay_Final1647585818.MP4
The reviewers will make that decision. Labeling this for further investigation as I cannot reproduce this locally. |
Fixed by flutter/engine#31982 |
@luckysmg thanks for your contribution. |
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 |
Uh oh!
There was an error while loading. Please reload this page.
Steps to Reproduce
Keyboard dismiss is not handled properly for iOS custom keyboards. If you look at second video, it seems like the issue happens if the custom keyboard height is too large when dismissed.
Precondition: Download custom keyboards: Bitmoji, Slyder
custom_keyboard_layout_issue.MP4
RPReplay_Final1646969495.MP4
Expected results: Lays out widgets properly when keyboard is dismissed
Actual results: It doesn't listen to keyboard dismiss when custom keyboard is too large.
Code sample
Logs
The text was updated successfully, but these errors were encountered: