Skip to content

fix(iOS): synchronize keyboard settings on initial mount - #903

Open
mustafa519 wants to merge 1 commit into
software-mansion:mainfrom
mustafa519:codex/fix-ios-keyboard-first-mount
Open

mustafa519 wants to merge 1 commit into
software-mansion:mainfrom
mustafa519:codex/fix-ios-keyboard-first-mount

Conversation

@mustafa519

Copy link
Copy Markdown

Summary

On the initial mount, an explicit autoCorrect={false} or spellCheck={false} can match the stored Fabric default, so updateProps skips applying it while UITextView still has its system-default setting. The wrong native setting is then present when autofocus runs.

Compare each requested UIKit enum with the text view’s actual setting. This applies initial false values, preserves subsequent prop updates, and avoids redundant native writes. Both settings are synchronized before the existing autofocus block.

Test Plan

The earlier UIKit probe exercised all four initial boolean combinations and subsequent prop updates. The corrected synchronization passed those checks. The full React Native example and repository E2E suite were not rebuilt or run for this branch.

To verify in the example app:

  1. Mount an input with autofocus and both keyboard settings set to false; confirm both native settings are disabled before focus.
  2. Repeat with the other three boolean combinations.
  3. Toggle each prop on the mounted input and confirm that the native setting follows it.

Screenshots / Videos

No visual attachment; verification inspected native keyboard settings.

Compatibility

OS Implemented
iOS Yes
Android No source changes
Web No source changes

Checklist

  • E2E tests are passing (not run for this branch)
  • Required E2E tests have been added (no E2E files in this change)

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The iOS text input now checks autocorrection and spell-check settings against the new props on every props update. It updates each native setting only when the current value differs.

Changes: iOS text input settings

Layer / File(s) Summary
Synchronize native text settings
ios/EnrichedTextInputView.mm
Each props update now compares the native autocorrection and spell-check settings with the new props and updates mismatched values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: fendent, exploif, kacperzolkiewski

Merge Risk: Minimal · up to 9b2af

This change makes explicit autoCorrect={false} and spellCheck={false} take effect on the initial iOS mount. Omitted props keep their documented defaults. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: it fixes iOS keyboard settings (autoCorrect and spellCheck) so they synchronize on initial mount. The raw summary and objectives confirm that the change covers exactly…
Description check Passed The description states the bug (explicit false values for autoCorrect or spellCheck match the stored Fabric default, so updateProps skips them). It explains the fix (comparing each UIKit enum with the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: it fixes iOS keyboard settings (autoCorrect and spellCheck) so they synchronize on initial mount. The raw summary and objectives confirm that the change covers exactly this behavior. The title is specific and concise.

Full details: Description check

Explanation

The description states the bug (explicit false values for autoCorrect or spellCheck match the stored Fabric default, so updateProps skips them). It explains the fix (comparing each UIKit enum with the actual UITextView setting before autofocus) and gives test steps. It matches the iOS change in EnrichedTextInputView.mm. It also says E2E tests were not run, which is a clear, relevant statement.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 03af278 and 9b2af4e.

Files selected for processing: 1

  • ios/EnrichedTextInputView.mm

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

This branch has not been deployed

No deployments
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.

1 participant