Skip to content

fix(footer): keep safe area padding until the webview resizes for the keyboard - #31693

Open
ShryukGrandhi wants to merge 1 commit into
ionic-team:mainfrom
ShryukGrandhi:fix/issue-30268-bug-ui-jumping-when-opening-keyboard-in
Open

ShryukGrandhi wants to merge 1 commit into
ionic-team:mainfrom
ShryukGrandhi:fix/issue-30268-bug-ui-jumping-when-opening-keyboard-in

Conversation

@ShryukGrandhi

Copy link
Copy Markdown

Issue number: resolves #30268


What is the current behavior?

When the keyboard starts to open, ion-footer removes its bottom safe area padding as soon as keyboardWillShow fires. The webview has not resized yet at that point, so the footer gets shorter, the content gets taller, and content scrolled to the bottom shifts down before the keyboard appears. The footer already waits for the webview to resize when the keyboard closes, but not when it opens.

What is the new behavior?

  • The keyboard controller now returns a resize promise when the keyboard opens too. It resolves once the resize container (ion-app or body) is no longer at its initial height. Closing behaves as before.
  • ion-footer waits for that promise in both directions before toggling the safe area padding, so the padding is removed in the same frame the webview shrinks.
  • When there is no resize container (no Keyboard plugin, resize: none, SSR) no promise is returned and the footer updates immediately, as before. ion-tab-bar still hides immediately on open.
  • Added a spec test for ion-footer that mocks the Capacitor Keyboard plugin and a ResizeObserver.

This covers only the footer padding part of the issue. The iOS plugin resizing after the animation and the scroll position are tracked in #28864 and #28226.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Tested with npx stencil test --spec -- src/components/footer src/components/tab-bar src/utils/keyboard. The new test fails without the change and passes with it.

Fixes #30268

… keyboard

Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
@ShryukGrandhi
ShryukGrandhi requested a review from a team as a code owner November 4, 2026 01:12
@ShryukGrandhi
ShryukGrandhi requested a review from ShaneK November 4, 2026 01:12
@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

@ShryukGrandhi is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the package: core @ionic/core package label Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: UI Jumping When Opening Keyboard in Chat Page

1 participant