-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Keyboard Animation Fix #176418
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 Animation Fix #176418
Conversation
8daa119 to
bf698ee
Compare
|
It wasnt obvious to me where tests for this class lived. I think it is engine/src/flutter/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java |
This reverts commit a52c1af.
gmackall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When trying to change any piece of this logic in the past I've experienced it breaking random individual modes of https://api.flutter.dev/flutter/services/SystemUiMode.html
Have you tested those modes as well? If not, can you try opting out of edge-to-edge as described here https://docs.flutter.dev/release/breaking-changes/default-systemuimode-edge-to-edge?_gl=1*q1wl35*_ga*MTM2MzE0NDc2My4xNzU4NzUzNDI0*_ga_04YGWK0175*czE3NTk1MTc5MTkkbzUkZzAkdDE3NTk1MTgwNDAkajYwJGwwJGgw#migration-guide, and ensure that those modes aren't regressed? Sorry to add a bunch more validation work but this has historically been extremely brittle.
| int excludedInsets = 0; | ||
| int systemUiFlags = view.getWindowSystemUiVisibility(); | ||
| if ((systemUiFlags & View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0 | ||
| if (!((systemUiFlags & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This conditional is getting too long for me to understand it, written inline. Are there any logical pieces you can break out of here into intermediate booleans with helpful names?
gmackall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change LGTM though if those comments are addressed.
Yeah, I need to go back and test the code sample provided in #109623 pre-15 and post-15. Will do before submitting. |
Unfortunately, it looks to me like it breaks pre-15. It's harder for me to check, because I just have an emulator, but it definitely is creating too much space. That being said, it may just make sense to fork on the SDK level Reading this makes me think this is the correct call. WDYT? @reidbaker @gmackall Testing |
|
That link takes me to https://developer.android.com/about/versions/15/behavior-changes-15 is there a subtitle that more specificly makes you think branching on 35+ behavior is the right thing to do? |
|
|
With the API fork, everything seems to be working correctly: Android 12:
Honestly, I cannot find anything definitive about the IME insets including the height of the navigation bar. It certainly seems like this is not the case post 15. |
...e/src/flutter/shell/platform/android/test/io/flutter/plugin/editing/TextInputPluginTest.java
Outdated
Show resolved
Hide resolved
Roll Flutter from 908012d58baa to e11e2c11288b (39 revisions) flutter/flutter@908012d...e11e2c1 2025-10-08 [email protected] Configure FfiNative resolver on dart:io (flutter/flutter#176621) 2025-10-08 [email protected] Marks Linux_pixel_7pro service_extensions_test to be unflaky (flutter/flutter#176700) 2025-10-08 [email protected] Keyboard Animation Fix (flutter/flutter#176418) 2025-10-08 [email protected] Feat: Add carousel view builder (flutter/flutter#172837) 2025-10-08 [email protected] Roll Skia from d10a0d877ff4 to ea7cdbc6b986 (15 revisions) (flutter/flutter#176686) 2025-10-08 [email protected] Roll Fuchsia Linux SDK from jJr3my9C6TwYWPygi... to xrIAL91ngrd-wNr9S... (flutter/flutter#176682) 2025-10-08 [email protected] Fix InputDecoration helper/error padding is not compliant (flutter/flutter#176353) 2025-10-08 [email protected] Fix PopupMenu does not update when PopupMenuTheme in Theme changes. (flutter/flutter#175513) 2025-10-07 [email protected] Roll Dart SDK to 3.10.0-290.1.beta (flutter/flutter#176629) 2025-10-07 [email protected] [ Tool ] Output `app.dtd` and `app.devTools` in machine mode (flutter/flutter#176655) 2025-10-07 [email protected] Rename UIScene integration test projects and fix Xcode compatibility (flutter/flutter#176635) 2025-10-07 [email protected] Selecting an implementation widget with the on-device inspector opens the code location for the nearest project widget (flutter/flutter#176530) 2025-10-07 [email protected] Migrate to `WidgetStateInputBorder` (flutter/flutter#176386) 2025-10-07 [email protected] Make it clear that you need to install clangd in VSCode intellisense c++ config (flutter/flutter#176609) 2025-10-07 [email protected] Bump the customer tests to pick up an update to Zulip's tests. (flutter/flutter#176463) 2025-10-07 [email protected] Roll Packages from d3ef88b to 8ca6416 (2 revisions) (flutter/flutter#176633) 2025-10-07 [email protected] Add fallback for 'scene:willConnectToSession:options' (flutter/flutter#176580) 2025-10-07 [email protected] Roll Skia from d09786dfb854 to d10a0d877ff4 (11 revisions) (flutter/flutter#176616) 2025-10-07 [email protected] [ Widget Preview ] Rework UI and theming (flutter/flutter#176581) 2025-10-07 [email protected] Handle FlutterEngine registration when embedded in Multi-Scene apps (flutter/flutter#176490) 2025-10-07 [email protected] Fix code style in Linux embedder template (flutter/flutter#176256) 2025-10-07 [email protected] Add tooling to migrate to UIScene (flutter/flutter#176427) 2025-10-06 [email protected] Bump customer tests.version to 986c4326b4e4bb4e37bc963c2cc2aaa10b943859 (flutter/flutter#176594) 2025-10-06 [email protected] Fix typo in pages.dart (flutter/flutter#176438) 2025-10-06 [email protected] Fix: Update anchorRect for overlayBuilder when anchor moves (flutter/flutter#169814) 2025-10-06 [email protected] Roll Fuchsia Linux SDK from Zm6K_3gP3VCaMy9rH... to jJr3my9C6TwYWPygi... (flutter/flutter#176591) 2025-10-06 [email protected] Fix deprecated configureStatusBarForFullscreenFlutterExperience for Android 15+ (flutter/flutter#175501) 2025-10-06 [email protected] updates docs for flutter engine footprint (flutter/flutter#176217) 2025-10-06 [email protected] [ Widget Preview ] Fix `WidgetInspectorService` override (flutter/flutter#176550) 2025-10-06 [email protected] Fix NavigatorBar lacks visual feedback (flutter/flutter#175182) 2025-10-06 [email protected] Roll Packages from e401aeb to d3ef88b (4 revisions) (flutter/flutter#176582) 2025-10-06 [email protected] Roll Dart SDK from 898380a41c90 to 6b0193498f09 (2 revisions) (flutter/flutter#176576) 2025-10-06 [email protected] Roll Skia from bc7cf194f4ee to d09786dfb854 (1 revision) (flutter/flutter#176577) 2025-10-06 [email protected] Roll vulkan-deps to a9e2ca3b (flutter/flutter#176322) 2025-10-06 [email protected] Add an AppDelegate callback for implicit FlutterEngines (flutter/flutter#176240) 2025-10-06 [email protected] Roll Skia from 45191c22b15c to bc7cf194f4ee (2 revisions) (flutter/flutter#176572) 2025-10-06 [email protected] [ Widget Preview ] Fix type error when retrieving flags from persistent preferences (flutter/flutter#176546) 2025-10-06 [email protected] Roll Skia from 1fd0ca1f2120 to 45191c22b15c (3 revisions) (flutter/flutter#176556) 2025-10-05 [email protected] Roll Dart SDK from 016a8c0045fd to 898380a41c90 (1 revision) (flutter/flutter#176549) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. ...
|
Hello, I’d like to ask whether updating Flutter to the latest version would resolve the issue of the keyboard causing the input field to jitter. I found that after updating to Flutter 3.35.7, the problem still persists. |
|
To determine what versions of Flutter contain the fix, please see where’s my commit. If the commit has no release tag, it is currently only available in the master channel. |
|
It's in beta channel now. I tested it and seemed to work okay. Hope to see in next stable release. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Fixing Keyboard Animation Issue Before: https://github.com/user-attachments/assets/2b863ca1-20e3-47e2-94f1-5cb2083c1e28 After: https://github.com/user-attachments/assets/914efc84-13aa-4bde-8c44-d1761f1fe79a Fixes: flutter#168768 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing.
Fixing Keyboard Animation Issue
Before:
Screen_recording_20251001_152525.mp4
After:
Screen_recording_20251002_095046.mp4
Fixes: #168768
Pre-launch Checklist
///).