Fabric TextInput: prepareForRecycle leaves stale inputAccessoryViewButtonLabel (empty Done bar)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- objective-c, react-native
- 領域
- mobile
研究方向
從 RCTTextInputComponentView 的 prepareForRecycle 開始,追蹤 updateProps 和 setDefaultInputAccessoryView 如何處理 inputAccessoryViewButtonLabel。在使用 Fabric 的 iOS 26.5 Simulator 上,將帶有標籤的文字輸入回收為沒有標籤的數字、小數或電話鍵盤輸入,以重現問題。重新掛載的輸入欄不再顯示空的 Done 工具列時即代表完成;如果選擇這種做法,請驗證零長度標籤的替代行為。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- C++
- 星號
- 127k
- 分支
- 25.3k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
react/react-native 的其他 Issue
-
Needs: Attention Needs: Repro
難度 2/5 1-3 小時 新手友好度 78/100
react/react-native#58904 · 2 則留言 ·
維護者通常 1 天內回覆
-
Needs: Author Feedback Needs: Repro
難度 2/5 1-3 小時 新手友好度 75/100
react/react-native#58659 · 2 則留言 ·
維護者通常 1 天內回覆
-
Needs: Author Feedback Needs: Repro
難度 1/5 1 小時以內 新手友好度 92/100
react/react-native#58621 · 1 則留言 ·
維護者通常 1 天內回覆
-
Add TypeScript declaration for the performance global可能已有人在做 @Cedric921 於 6 天前認領。 未關閉Needs: Attention Needs: Repro
難度 2/5 1-3 小時 新手友好度 85/100
react/react-native#58610 · 4 則留言 ·
維護者通常 1 天內回覆
-
Needs: Triage :mag:
難度 2/5 1-3 小時 新手友好度 82/100
react/react-native#58565 · 2 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
查看 react/react-native 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
mesonbuild/wrapdb#2961 ·
維護者通常 1 天內回覆
-
80 Instance - Raid - Northrend
難度 2/5 1-3 小時 新手友好度 62/100
azerothcore/azerothcore-wotlk#28075 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
objectionary/eo-graphs#80 ·
-
難度 2/5 1-3 小時 新手友好度 84/100
scanaislop/aislop#476 ·
維護者通常 1 天內回覆