feat: default autofocus prop value to false - #706
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR ensures EnrichedTextInput does not auto-focus by default on Web (and aligns Native for consistency) by defaulting the autoFocus prop to false when it’s not provided, avoiding Tiptap’s implicit autofocus behavior when autofocus is undefined.
Changes:
- Default
autoFocustofalsein the WebEnrichedTextInputprop destructuring so Tiptap receivesautofocus: falseunless explicitly enabled. - Apply the same
autoFocus = falsedefault in the NativeEnrichedTextInputcomponent for consistent JS-side behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/web/EnrichedTextInput.tsx |
Defaults autoFocus to false so Tiptap doesn’t auto-focus when the prop is omitted. |
src/native/EnrichedTextInput.tsx |
Mirrors the same defaulting behavior for consistency before passing autoFocus to the native component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
szydlovsky
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On web when
autoFocusprop was not provided inEnrichedTextInput- it wasundefined, Tiptap would default to the enabled autofocus, which we don't want.Now the
autoFocusprop defaults tofalseif not provided.Added the same default value in the native
EnrichedTextInputcomponent for consistency. That change does practically nothing, as earlier it also defaulted to a disabled auto-focus if not provided, but it was handled on the native side - now it happens earlier in JS.Compatibility
Checklist