Skip to content

Fix iOS keyboard insets for floating keyboard - #3576

Open
Vendula Švastalová (svastven) wants to merge 2 commits into
jb-mainfrom
svastven/CMP-11095
Open

Vendula Švastalová (svastven) wants to merge 2 commits into
jb-mainfrom
svastven/CMP-11095

Conversation

@svastven

@svastven Vendula Švastalová (svastven) commented Nov 5, 2026 •

Copy link
Copy Markdown

Fixes

  • Treat keyboard frames that do not reach the bottom of the screen as non-overlapping, so floating, undocked, and split keyboards do not create an IME bottom inset
  • When willHide interrupts an in progress keyboard to shortcut-bar animation, continue from the current visible animation position instead of snapping to the shortcut bar first

Fixes CMP-11095 iOS: a floating (undocked) iPad keyboard is treated as docked — WindowInsets.ime reports the distance from its top edge to the bottom of the screen

Testing

  • Adds imePadding() coverage for a floating keyboard frame
  • Adds a regression test for a keyboard frame change followed by willHide, checking the bottom content continues animating without a jump

Release Notes

Fixes - iOS

  • Fix incorrect bottom IME insets with floating, undocked, and split keyboards on iPad
  • Fix bottom IME insets that could remain above the screen bottom after the keyboard is dismissed on iPad

}

private fun isUndockedKeyboard(frame: CValue<CGRect>, screen: UIScreen): Boolean =
CGRectGetMaxY(frame) < CGRectGetMaxY(screen.bounds)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it worth checking width of the keyboard as well?
Also, since we're working with doubles, could you please compare values with tolerance here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants