Repository navigation
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.
Closes #2625
Problem
With
overlaysWebView: false, the plugin moves the WebView below the status bar once. After a full-screen modal is dismissed (for exampleBrowser.open()), UIKit sets the root view, which is the WebView, back to the full window bounds. The plugin does not lay out again:handleViewDidAppearcallssetOverlaysWebView, which returns early because the value did not change. The page then sits under the status bar until the next rotation.Change
StatusBar.swiftonly:overlaysWebViewisfalse, the plugin observespositionandboundsof the WebView layer. When the WebView origin no longer matches the status bar height, the plugin lays out the WebView again and brings the background view to the front. This happens in the same layout pass as the reset, so there is no visible jump.resizeWebView()setsisApplyingLayoutwhile it changes the frame, so the plugin does not react to its own changes.@capacitor/keyboardwithresize: native.handleViewDidAppearalso lays out again, as a fallback for a reset the observer cannot correct.setOverlaysWebView(true)stops the observation,setOverlaysWebView(false)starts it.No API or configuration change. The change is iOS only.
Testing
Tested with the reproduction from the issue. "Before" is 8.0.4, "After" is this change.
Browser.open()full screen, then closeBrowser.open()full screen, then closeBrowser.open()withpresentationStyle: 'popover', then close@capacitor/keyboard8.0.6)Not tested: iPad,
StatusBar.hide()andshow(), togglingoverlaysWebViewat runtime.