Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 28, 2025

Adds a new disableKeyboardController prop to completely disable react-native-keyboard-controller when it conflicts with react-native-navigation or other keyboard handling libraries on Android.

Problem

Users reported that react-native-keyboard-controller is incompatible with react-native-navigation on Android, causing keyboard handling issues. The existing isKeyboardInternallyHandled prop only disables internal keyboard animations but still requires the KeyboardProvider wrapper, which can conflict with other navigation libraries.

Solution

The new disableKeyboardController prop provides a complete bypass of react-native-keyboard-controller:

  • Bypasses KeyboardProvider: Renders the chat without wrapping in KeyboardProvider
  • Mocks keyboard hooks: Creates a mock keyboard object to prevent hook violations
  • Disables animations: Skips all keyboard-related animation logic
  • Falls back gracefully: Chat functionality remains fully intact without keyboard controller

Usage

<GiftedChat
  messages={messages}
  onSend={onSend}
  user={user}
  disableKeyboardController={true} // Disable for react-native-navigation compatibility
/>

Fixes #2613


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: kesha-antonov <11584712+kesha-antonov@users.noreply.github.com>
@kesha-antonov
Copy link
Collaborator

@copilot merge master

Copy link
Contributor Author

Copilot AI commented Aug 28, 2025

@copilot merge master

Master branch has been successfully merged into the PR branch. The merge commit is 61333ae.

Copilot finished work on behalf of kesha-antonov August 28, 2025 22:06
@kesha-antonov
Copy link
Collaborator

@copilot merge master and retry make find solution in PR

Co-authored-by: kesha-antonov <11584712+kesha-antonov@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 28, 2025

@copilot merge master and retry make find solution in PR

Master has been merged and the complete solution is now implemented in commit c5b7c7e. The disableKeyboardController prop provides a clean way to completely disable react-native-keyboard-controller when using react-native-navigation or other conflicting keyboard libraries. All tests are passing and documentation has been updated.

@Copilot Copilot AI changed the title [WIP] Android - react-native-keyboard-controller not compatible with react-native-navigation Add disableKeyboardController prop to fix react-native-navigation compatibility Aug 28, 2025
Copilot finished work on behalf of kesha-antonov August 28, 2025 22:41
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.

Android - react-native-keyboard-controller not compatible with react-native-navigation
2 participants