callstack / callstack/react-native-paper

Using Portal and a TextInput with "value=" inside it makes the Backspace key to not behave properly when using finger sliding to write on Android

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

描述

### Current behaviour
Using backspace only deletes the last letter after using finger sliding to write

### Expected behaviour
Using backspace should delete the entire word after using finger sliding to write

### How to reproduce?
- Create a Portal component
- Add a TextInput with a "value="
- Start your project on your phone
- Type a word in the TextInput by using finger sliding on letters
- Press the backspace key
- Observe the issue where only the last letter gets deleted
------------------------------------------------------------------------------------
- Remove the Portal component
- Start your project on your phone
- Type a word in the TextInput by using finger sliding on letters
- Press the backspace key
- Observe the correct behavior where the entire word gets deleted

### Notes:

Everything works as intended when using a "defaultValue=" instead of "value=". But using defaultValue instead creates other issues like not being able to clear the input field with a button (without hacky workarounds with ref= for example).
I think this is the same kind of issue as the one where using "value=" makes the cursor jump to the left when writing in the middle of a sentence.

### Your Environment

| software | version
| --------------------- | -------
| android | 14
| react-native | 0.74.2
| react-native-paper | 5.12.3

贡献指南

打开贡献指南

调研方向

首先,在 Android 14 上使用包含受控 TextInput(使用 value=)的 Portal 重现该问题,然后将其与 defaultValue= 进行比较。验证通过手指滑动输入一个单词并按下 backspace 时的行为;当受控输入删除整个正在组合的单词,同时保留以编程方式清除它的能力时,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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