Skip to content
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

Keyboard closes right after popping up with Hidden Navigation Bar #61718

Closed
coleary01 opened this issue Jul 17, 2020 · 15 comments
Closed

Keyboard closes right after popping up with Hidden Navigation Bar #61718

coleary01 opened this issue Jul 17, 2020 · 15 comments
Labels
in triage Presently being triaged by the triage team

Comments

@coleary01
Copy link

coleary01 commented Jul 17, 2020

Hi,

I've come across an issue, not sure if its a bug or a setting etc, but if you have the navigation bar set to hidden, you can't access the keyboard. As soon as you set it to be permanently on, like stock Android, keyboard works fine.

I can only replicate the issue on a Samsung A600, which makes up a lot of our user base.

See Google drive link below for video showing the issue.

MP4 video of issue

Android Studio version 4.0
Android SDK version 28.0.3
Flutter version 47.1.2
Dart plugin version 193.7361

Thanks

Chris

@VladyslavBondarenko
Copy link

Hi @coleary01
could you check if it's the same with latest master version and mention with what version have you tested? (I don't have a device with the hiding navbar function)

@VladyslavBondarenko VladyslavBondarenko changed the title Flutter with Hidden Navigation Bar Keyboard closes right after popping up with Hidden Navigation Bar Jul 17, 2020
@VladyslavBondarenko VladyslavBondarenko added e: device-specific Only manifests on certain devices framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically dependency: android Android team may need to help us labels Jul 17, 2020
@coleary01
Copy link
Author

hi @VladyslavBondarenko,
Yeah i can check this against master, when you say "mention with what version I have tested", do you mean the version of master or the version of flutter running currently?

Thanks.

@VladyslavBondarenko
Copy link

@coleary01 version of master

@coleary01
Copy link
Author

coleary01 commented Jul 21, 2020

Unfortunately i'm unable to test master as the app wont build due to the following error with one of our 3rd party packages:

flutter_cupertino_date_picker-1.0.26+2/lib/src/date_picker_theme.dart:23:32: Error: Type 'DiagnosticableMixin' not found. class DateTimePickerTheme with DiagnosticableMixin

[√] Flutter (Channel master, 1.21.0-2.0.pre.88, on Microsoft Windows [Version 10.0.18362.30], locale en-GB) • Flutter version 1.21.0-2.0.pre.88 at C:\Users\coleary\source\flutter • Framework revision 3e7fe378e3 (5 hours ago), 2020-07-21 05:36:03 -0400 • Engine revision dcc9a4048d • Dart version 2.9.0 (build 2.9.0-21.0.dev 9dca49e71e)

@coleary01
Copy link
Author

Update to the above:

They have a pending pull request to change this to Diagnosticable.

Pull Request

@VladyslavBondarenko
Copy link

@coleary01
does it happen with any app when NavBar in this mode?

For example with this simple code sample
import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        body: Center(
          child: TextField(),
        ),
      ),
    );
  }
}

@coleary01
Copy link
Author

I will give this a try today.

@goderbauer goderbauer added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 22, 2020
@coleary01
Copy link
Author

coleary01 commented Jul 23, 2020

I have created a brand new app with a TextField() and the issue does not occur on the Stable branch or Master.

Do you have any idea what could be causing the issue?

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
            TextField()
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 23, 2020
@VladyslavBondarenko VladyslavBondarenko added in triage Presently being triaged by the triage team and removed dependency: android Android team may need to help us e: device-specific Only manifests on certain devices framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically labels Jul 23, 2020
@VladyslavBondarenko
Copy link

@VladyslavBondarenko VladyslavBondarenko added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 23, 2020
@coleary01
Copy link
Author

I'll try to reproduce this.

I did have tried that answer on stack overflow but we was already doing what is suggested. This is why I posted on here to see if it was something else 😄

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 23, 2020
@VladyslavBondarenko VladyslavBondarenko added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 23, 2020
@shen-lan
Copy link

Have you solved this problem now?

I encountered the same problem. When I click on the text box, the keyboard will pop up and then retract.
When the normal text box is switched to the password text box, the keyboard will also be folded.

The flutter version switch to dev/stable/master/beta is the same

@shen-lan
Copy link

It prompts that "DiagnosticableMixin" cannot be found because it is referenced in the library you installed, but "DiagnosticableMixin" is deleted from the latest api of flutter

@coleary01
Copy link
Author

@shen-lan I still haven't resolved the problem yet.

Trying to build a replica project in between sprint tasks to replicate the issue.

Essentially we are doing "custom" forms, so you design a form on the web app and the mobile parsons the json to create a form.

All works well, bar this keyboard issue when the system navigation bar is hidden on a Samsung A600.

The DiagnosticableMixin issue is awaiting a pull request on the git project site.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 28, 2020
@VladyslavBondarenko VladyslavBondarenko added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 28, 2020
@TahaTesser TahaTesser removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Aug 25, 2020
@TahaTesser
Copy link
Member

Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

@github-actions
Copy link

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 -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in triage Presently being triaged by the triage team
Projects
None yet
Development

No branches or pull requests

5 participants