Third-party keyboards get an extra 17pt gap at the top after switching apps on iOS 27 beta.

Feedback submitted: FB24460699 The sample projects are attached to the feedback report.

Environment:iOS27 Beta6; iPhone 17Pro

Problem:I have encountered a consistently reproducible third-party custom keyboard layout issue in iOS 27.0 beta 1 through beta 6.

The custom keyboard initially appears correctly. If I switch apps while the text input remains focused and the keyboard remains visible, and then return to the host app, the system adds a 17-point area above the custom keyboard extension.

Steps to reproduce

  1. Install and enable a third-party custom keyboard.
  2. Switch to the sample custom keyboard and open the host app so that the text editor in the center receives focus.
  3. Do not dismiss the keyboard or remove focus from the editor. Return to the Home Screen or switch to another app.
  4. Return to the host app.
  5. A new blank area now appears above the custom keyboard content.

I tested both a system-determined extension view height and an extension view explicitly constrained to 180 points. Both configurations produce exactly the same change.

After the foreground transition, the following extension-side values remain unchanged:

  • view.bounds
  • inputView.bounds
  • extension.window.bounds
  • view.safeAreaInsets, which remains {0, 0, 0, 0}
  • The requested 180-point extension height

Only the system keyboard frame received by the host app increases by 17 points. I also drew a rounded pink boundary inside the transparent extension root view. When the issue occurs, the new area appears outside that boundary.

I tested several third-party keyboards and reproduced the issue with all of them. This suggests that the behavior is caused by iOS rather than by my app.

Questions

  1. On iOS 27, is it expected behavior for a custom keyboard to gain a 17pt top area after its host app returns from the background?
  2. If this is a system issue, is there any workaround that can be used until it is fixed?

This sounds like the same or very similar issue I’ve reported on iOS 26.

FB21449121: UIInputViewController: Custom keyboard extension height is incorrect depending on which keyboard you switched from when app has an input accessory view

  1. Start on the English system keyboard
  2. Tap and hold the globe key and switch to the third-party keyboard
  3. Notice the height and layout of the keyboard - take a screenshot
  4. Tap and hold the globe key and switch to the emoji keyboard
  5. Tap and hold the globe key and switch to the third-party keyboard
  6. Notice the height and layout of the keyboard - take a screenshot
  7. Compare the screenshots

Expected: The screenshots should be identical Actual: The keyboard height is smaller when you came from the emoji keyboard due to losing insets from the top edge

Still not fixed in iOS 27.0 (24A435).

I’m seeing the same behavior in my custom keyboard:

  • Switching from Apple’s English keyboard to the custom keyboard adds a 17-point gap above its content.
  • Switching from Apple’s Emoji keyboard to the custom keyboard removes the gap.

I compared Xcode view hierarchy captures from the host app in both states. The extension’s content remains 440 × 322 points, with unchanged safe-area insets. The host-owned inputView.top constraint changes from 0 to 17 points, and UIInputSetHostView grows from 397 to 414 points.

The host container moves upward by 17 points while the keyboard content stays at the same screen position. Bottom spacing remains 75 points. The keyboard background therefore appears taller without any change to the extension’s actual layout.

This suggests the extra spacing depends on the previously active system keyboard. Is there a supported way for a keyboard extension to reset this inset?

Can confirm it's still a problem in iOS 27.0.1 with the same repro steps

I confirm the same issue. I also created a ticket: FB24785360

Same here — filed FB25094825 with a minimal sample project (a plain UIInputViewController with a single 260 pt height constraint, no third-party code), a video and measurements.

A few data points that might help:

  • English -> custom keyboard: keyboard frame 352 pt; Emoji -> custom keyboard: 335 pt (iPhone 15 Pro, iOS 27.0). Reproduces every time, also with the plain sample keyboard.
  • iOS 18.5 Simulator, same steps: 335 pt every time, so it's a regression (FB21449121 above suggests it started in iOS 26).
  • The inset seems to follow stale state of the hidden system assistant row: the host's TUISystemInputAssistantView is hidden (height 0) in both states, but its subviews keep the previous keyboard's row height — 44 pt after English -> 17 pt inset, 53 pt after Emoji (emoji search row) -> no inset. The native English keyboard with its assistant bar hidden gets the same 17 pt, so the inset itself looks intended; it's just applied inconsistently to third-party keyboards.
  • Nothing on the extension side changes it (allowsSelfSizing, UIHostingController.safeAreaRegions = [], re-requesting layout on appear, UIInputView style). The extension's window, view and safe area are identical in both states, so there is nothing to detect or compensate for.

But guys, no worries, they won't fix it, so it's better to just adjust the keyboard to this behavior.

I've reported multiple keyboard bugs over the last few years - none of them has been fixed. And some are quite critical. My favorite one is that iOS installs additional language based on your keyboard bundle id. So if it starts for example with "pl.*" it will install Polish 🤦‍♂️ - reported 2 years ago, not fixed yet. And there is no workaround because you can't just change bundle id.

Also, please note that reserved areas / hinge detection doesn't work in keyboard extensions either.

Can confirm this also happens in iOS 27 on iPhone 16 Pro. Need this fixed ASAP as it is making the UI experience extremely inconsistent

Third-party keyboards get an extra 17pt gap at the top after switching apps on iOS 27 beta.
 
 
Q