callstack / callstack/react-native-paper
Opening a Menu from a TextInput anchor on the web unfocuses the anchor
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
### Current behaviour
When a Menu has a TextInput as an anchor, if that input's onFocus is used to open the menu, it becomes unfocused.
### Expected behaviour
This is not consistent with Android, where it keeps focus. It would be nice if it worked this way on the web too, so that a searchable dropdown can be implemented.
### Code sample
https://snack.expo.dev/@pta2002/eb79e2
### What have you tried
I have tried using a separate component (not the anchor) to trigger the menu, but it got unfocused as well. Either way, I think the behaviour should at least be consistent.
### Your Environment
| software | version
| --------------------- | -------
| ios or android | Android 11
| react-native | 0.63.2
| react-native-paper | 4.9.2
| node | 14.17.6
| npm or yarn | npm 6.14.15
| expo sdk | 42.0.1
贡献指南
调研方向
从链接的 Expo Snack 开始,在 Web 上从 TextInput 打开 Menu 时复现焦点丢失。然后追踪 Menu 的锚点和焦点行为,与 Android 进行比较,并验证可搜索的下拉菜单在 Web 上会保持 TextInput 获得焦点。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- frontend, mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100