Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Fabric TextInput: prepareForRecycle leaves stale inputAccessoryViewButtonLabel (empty Done bar)

Open Beginner friendly
#58,952 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
objective-c, react-native
Domain
mobile

Research direction

Start with RCTTextInputComponentView's prepareForRecycle and trace how updateProps and setDefaultInputAccessoryView handle inputAccessoryViewButtonLabel. Reproduce on an iOS 26.5 Simulator with Fabric by recycling a text input from one with a label to an unlabelled number, decimal, or phone pad. Done when the remounted input no longer shows an empty Done toolbar; verify the alternative zero-length-label behavior if choosing that approach.

Written by the indexing model from the issue text.

Description

Needs: Author Feedback Needs: Repro

Description

On Fabric (RN 0.85), RCTTextInputComponentView prepareForRecycle clears inputAccessoryView, inputAccessoryViewID, and _hasInputAccessoryView, but does not clear _backedTextInputView.inputAccessoryViewButtonLabel.

When a recycled view is remounted for a number/decimal/phone pad without inputAccessoryViewButtonLabel, updateProps diffs against the stale _props and may not re-assign the label. RCTNSStringFromString("") returns @"" (non-nil). setDefaultInputAccessoryView treats any non-nil label as "has a label":

BOOL containsInputAccessoryViewButtonLabel = inputAccessoryViewButtonLabel != nil;

So an unlabelled number pad on a recycled view shows an empty Done toolbar with an invisible button (reproduced on iOS 26.5 Simulator).

Suggested fix

In prepareForRecycle, also set:

_backedTextInputView.inputAccessoryViewButtonLabel = nil;

Alternatively, treat zero-length labels as unset in setDefaultInputAccessoryView (length == 0 → no accessory from the label path).

Environment

  • react-native 0.85.x / Fabric
  • iOS 26.5 Simulator
Dominant language
C++
Stars
127k
Forks
25.3k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react/react-native

All issues in react/react-native

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.