Skip to content

[iOS] OverKeyboardView does not work when the keyboard is not active #618

Closed
@thespacemanatee

Description

@thespacemanatee

Describe the bug

When I use this component, it works as expected on Android, but on iOS, the children of OverKeyboardView are invisible when the keyboard is not active. I know they are rendered because they show up in the element inspector and can be interacted with (buttons are still pressable).

I think this happens because UIRemoteKeyboardWindow is not available when the keyboard is not active, but I don't think it is expected for the contents to be invisible in such cases. If you look at Telegram, the popover can be opened whether or not the keyboard is active.

Code snippet

<OverKeyboardView visible={popoverModalVisible}>
  <View
    className={cn('absolute inset-0', className)}
    accessibilityViewIsModal={popoverModalVisible}
    onAccessibilityEscape={onRequestClose}
    pointerEvents="box-none"
    style={style}>
    {popoverContent}
  </View>
</OverKeyboardView>

Repo for reproducing

Please let me know if you need a repro, but I believe it should be fairly easy to reproduce.

To Reproduce
Steps to reproduce the behavior:

I tried my best to run the example ios app but I'm getting this error:

Screenshot 2024-10-08 at 12 07 57 AM

Expected behavior

When the keyboard is active, the children in OverKeyboardView should not be invisible.

Screenshots

iOS

simulator_screenshot_ABDF4AEB-BC2F-4088-AB87-DD494B823B18

Android

Screenshot_1728317773

Smartphone (please complete the following information):

  • Device: iPad mini
  • OS: iOS 18.1
  • RN version: 0.75.3
  • RN architecture: Paper
  • JS engine: Hermes
  • Library version: 1.14.0

Metadata

Metadata

Assignees

Labels

OverKeyboardViewAnything related to OverKeyboardView🍎 iOSiOS specific

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions