Repository navigation
Conversation
Co-authored-by: aeharding <2166114+aeharding@users.noreply.github.com>
9 of 11 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.
Description
On iOS, the webview (or
body/ion-appinbody/ionicresize modes) is resized well after the keyboard animation finishes, rather than alongside it. This PR removes the artificial delays so the resize happens in sync with the keyboard:onKeyboardWillShow: resize immediately instead of waiting forUIKeyboardAnimationDurationUserInfoKey + 0.2s. Removes the now-unuseddurationvariable.onKeyboardWillHide: resize immediately instead of after a0.01sdelay.resizeElement: apply the new height insiderequestAnimationFrameso the style change lands on the next frame rather than mid-frame, which avoids a visible jump.This is the same fix as #50 by @aeharding (ported from ionic-team/capacitor-plugins#2233), rebased onto current
main. #50 no longer merges cleanly because the iPad / Stage Manager handling and the QuickType bar logic changed the same area ofKeyboard.m. The original author is credited as a co-author on the commit. If #50 gets rebased and merged instead, feel free to close this one.Context
Resolves #19. Supersedes #50.
Because of the delay, content under the keyboard (e.g. a focused input or a chat composer) stays hidden for the whole keyboard animation plus 200ms, and then jumps into place. On hide, the webview background shows through for a moment. Android doesn't do this: it resizes before the animation starts. The delay is more noticeable with the iOS 26 translucent / rounded keyboard, as reported in #50 and ionic-team/capacitor#7992.
Type of changes
Platforms affected
Tests
We've shipped this exact change as a
patch-packagepatch in the production releases of our Capacitor 8 app since July 2026, first on@capacitor/keyboard8.0.3 and now on 8.0.5, usingresize: 'ionic'. With the patch, the resize follows the keyboard animation, and we haven't seen any regressions. The app builds for iOS with the patched plugin.