callstack / callstack/react-native-paper

TextInput loses focus inside Banner on iOS only

未关闭
#4,178 1 条评论 2 个 reaction 已指派 0 人 已被 @abdulbasithqb 认领 在 GitHub 查看
Banner bug
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

### Current behaviour
TextInput loses focus every type a character is entered and keyboard is dismissed. This happens only on iOS real device.
On android real device it works as expected.

### Expected behaviour
TextInput inside Banner shouldn't lose focus and keyboard should be visible.

### How to reproduce?
Create a TextInput component inside a Banner component
[Snack Expo Code ](https://snack.expo.dev/@sudarsangp/09b36b)

### Preview
[Demo of bug](https://github.com/callstack/react-native-paper/assets/2398969/91128bf7-561f-47f2-b5f4-cebe008fd4e9)

### What have you tried so far?

1. I setup the repo locally and modified `BannerExample` to reproduce the issue.
2. I commented the different parts in `Banner` source code
3. I noticed the `Surface` is rendered differently on iOS so commented different parts of source code

Unable to figure out, so I am not sure how to proceed.

### Your Environment

| software | version
| --------------------- | -------
| ios | 15.7.9
| react-native | 0.72.4
| react-native-paper | 5.10.1
| node | 18.17.0
| npm | 9.8.1
| expo sdk | 49.0.5

贡献指南

打开贡献指南

调研方向

先从 BannerExample 的复现和 Banner 源代码开始,然后使用链接的 Snack 比较 iOS 与 Android 上 Surface 的渲染。在 iOS 设备上复现该问题,并确认在 Banner 内的 TextInput 中输入内容时能够保持焦点,键盘仍保持可见。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native, typescript
领域
mobile
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。