Skip to content

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

Description

@nikocyprus-code

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

Activity

  1. react-native-bot commented on Oct 8, 2026

    @react-native-bot
    Collaborator

    Warning

    Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


    You can read more about about it on our website: How to report a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions