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
Description
On Fabric (RN 0.85),
RCTTextInputComponentViewprepareForRecycleclearsinputAccessoryView,inputAccessoryViewID, and_hasInputAccessoryView, but does not clear_backedTextInputView.inputAccessoryViewButtonLabel.When a recycled view is remounted for a number/decimal/phone pad without
inputAccessoryViewButtonLabel,updatePropsdiffs against the stale_propsand may not re-assign the label.RCTNSStringFromString("")returns@""(non-nil).setDefaultInputAccessoryViewtreats any non-nil label as "has a label":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:Alternatively, treat zero-length labels as unset in
setDefaultInputAccessoryView(length == 0→ no accessory from the label path).Environment