callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.97k stars 2.1k forks source link

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

Open Olfdev opened 5 months ago

Olfdev commented 5 months ago

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?

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
Olfdev commented 5 months ago

I have no idea what happened even though I searched for hours, but while refactoring my code, I moved some functions to other files and now it's properly working...

Olfdev commented 5 months ago

Reopening as I found out what's wrong.