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

Offen
#4,430 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
TypeScript
Sterne
14.5k
Forks
2.2k
Ø Merge
5 T. 23 Std.
Gemergte PRs (30 T.)
12

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.