flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
162.18k stars 26.64k forks source link

Flutter Android keyboard dismisses on notification panel pull down #147497

Closed ramsayamarin closed 2 weeks ago

ramsayamarin commented 2 weeks ago

Steps to reproduce

Youtube demonstration

As shown in the video, in my Flutter Android application running on a device, I tap on a text field, and it gains focus, but when I pull down the notification center and then close the notification center, the input focus gets lost, and the keyboard goes away. I don't want this behavior; instead, I want the keyboard to stay up and focus to remain unchanged, as it does in all other non-Flutter apps I tested. Anyone know how to achieve this?

Code sample

Code sample ```dart TextField() ```

What target platforms are you seeing this bug on?

Android

OS/Browser name and version | Device information

Any android device

Does the problem occur on emulator/simulator as well as on physical devices?

Unknown

Logs

Logs ```console [Paste your logs here] ```

Flutter Doctor output

Doctor output ```console [✓] Flutter (Channel stable, 3.19.6, on Microsoft Windows [Version 10.0.22631.3527], locale en-US) [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc2) [✓] Chrome - develop for the web [✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.6.0) [✓] Android Studio (version 2022.2) [✓] IntelliJ IDEA Ultimate Edition (version 2024.1) [✓] Connected device (4 available) [✓] Network resources • No issues found! ```
darshankawar commented 2 weeks ago

@ramsayamarin Check if your issue is same as https://github.com/flutter/flutter/issues/52599 or not.

ramsayamarin commented 2 weeks ago

@darshankawar Yes, I now believe the root cause is not the notification panel since it does trigger lifecycle events, so it is indeed the same issue. However, that issue has been stale for years, so I think it is worth raising attention to it once more. Can you please advise on why it has been unresolved for years? Thank you.

darshankawar commented 2 weeks ago

Thanks for the update. I suggest you to follow up in that issue for further updates. You may share your findings in it for better tracking. Closing this as a duplicate.

github-actions[bot] commented 1 day ago

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.