Skip to content

Add disableKeyboardController prop to fix react-native-navigation compatibility#2650

Merged
kesha-antonov merged 4 commits into
masterfrom
copilot/fix-2613
Nov 13, 2025
Merged

Add disableKeyboardController prop to fix react-native-navigation compatibility#2650
kesha-antonov merged 4 commits into
masterfrom
copilot/fix-2613

Conversation

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

@copilot merge master

Copy link
Copy Markdown
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.

@kesha-antonov
Copy link
Copy Markdown
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
Copy Markdown
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 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
@AnasZairig
Copy link
Copy Markdown

Hi @kesha-antonov
Is there any news about this PR? bacause we actually need this fix ASAP
And the solution here appears to be perfect.
Thanks.

@kesha-antonov kesha-antonov marked this pull request as ready for review November 13, 2025 18:19
@kesha-antonov kesha-antonov merged commit 331ff1b into master Nov 13, 2025
@kesha-antonov
Copy link
Copy Markdown
Collaborator

Hi @kesha-antonov

Is there any news about this PR? bacause we actually need this fix ASAP

And the solution here appears to be perfect.

Thanks.

Hi

Merged

@AnasZairig
Copy link
Copy Markdown

@kesha-antonov Thanks a lot! 🙌

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

3 participants