fix(android): restore content height when keyboard hides via insets l…#57
Open
TheCorbin wants to merge 1 commit intoionic-team:mainfrom
Open
fix(android): restore content height when keyboard hides via insets l…#57TheCorbin wants to merge 1 commit intoionic-team:mainfrom
TheCorbin wants to merge 1 commit intoionic-team:mainfrom
Conversation
…istener The onApplyWindowInsetsListener only called possiblyResizeChildOfContent when the keyboard was showing, but never restored the content height when the keyboard was dismissed. This caused a ghost keyboard bug where returning to the app after using the keyboard in the notification pane left a black space where the keyboard was, because the content view height remained shrunk. The fix passes the current keyboard visibility state to possiblyResizeChildOfContent so it resets the height to MATCH_PARENT when the keyboard is no longer visible. This handles cases where the keyboard is dismissed without a WindowInsetsAnimation (e.g. switching back to the app from the notification shade).
3 tasks
|
It would be even better to get rid of this code within this plugin altogether. I proposed this some time ago here. It's a bit unexpected to have this behavior still in place here, when it can easily be integrated in the core. Having this logic in two different places will lead to unexpected behavior such as this bug sooner or later |
|
For reference: duplicate of #53 |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The onApplyWindowInsetsListener only called possiblyResizeChildOfContent when the keyboard was showing, but never restored the content height when the keyboard was dismissed. This caused a ghost keyboard bug where returning to the app after using the keyboard in the notification pane left a black space where the keyboard was, because the content view height remained shrunk.
The fix passes the current keyboard visibility state to possiblyResizeChildOfContent so it resets the height to MATCH_PARENT when the keyboard is no longer visible. This handles cases where the keyboard is dismissed without a WindowInsetsAnimation (e.g. switching back to the app from the notification shade).
Description
Change Type
Rationale / Problems Fixed
Tests or Reproductions
Screenshots / Media
Platforms Affected
Notes / Comments