Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#58,952 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
objective-c, react-native
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu với RCTTextInputComponentView’s prepareForRecycle và lần theo cách updateProps cùng setDefaultInputAccessoryView xử lý inputAccessoryViewButtonLabel. Tái hiện lỗi trên iOS 26.5 Simulator với Fabric bằng cách tái sử dụng một ô nhập văn bản có nhãn thành ô không nhãn với bàn phím số, thập phân hoặc điện thoại. Hoàn tất khi ô nhập được gắn lại không còn hiển thị thanh công cụ Done trống; hãy xác minh hành vi thay thế với nhãn có độ dài bằng không nếu chọn cách đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react/react-native

Tất cả issue của react/react-native

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.