Fixed blank space after closing keyboard - #74
Open
Sharcoux wants to merge 1 commit into
Open
Conversation
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.
Description
Fixes a blank space left at the bottom of the WebView after the Android keyboard is dismissed when
resizeOnFullScreenis enabled.Changes in
Keyboard.java:MATCH_PARENTwhen the IME is hidden, instead of-1OnApplyWindowInsetsListeneron the content view (only whenresizeOnFullScreenis true) and remove duplicate resize calls from the insets animation callbackadjustMarginsForEdgeToEdgeconfigChange Type
Rationale / Problems Fixed
When
resizeOnFullScreenis enabled, the WebView is manually resized while the keyboard is open. After the keyboard is dismissed, the content view height was reset to-1, which does not reliably restore the layout on all devices — a blank gap can remain at the bottom of the screen.Upstream #60 improved this by resetting height when the keyboard hides without animation, but
-1still leaves residual layout issues in some cases. This PR resets toMATCH_PARENTexplicitly and consolidates resize handling into the window insets listener so hide/show transitions are handled consistently.Also adds edge-to-edge adjustments for Android 15+ so usable height is computed correctly when system bar insets apply.
Tests or Reproductions
Tested on Android with
resizeOnFullScreen: true:Screenshots / Media
N/A — layout issue best observed interactively on device/emulator.
Platforms Affected
Notes / Comments
resizeOnFullScreenis enabled in plugin config