callstack / react-native-paper

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

Input inside of Portal duplicates text #2780

Open crutchcorn opened 3 years ago

crutchcorn commented 3 years ago

Current behaviour

When a react-native TextInput is inside of a Portal (even if as a descendant, say, inside nested Views inside of a Modal ), when the user types, it will (inconsistently) duplicate the existing text in the input box

There doesn't seem to be a correlation between how much the user types. In my app (a non-minimal repro that I won't link), it seems to be nearly every 2-3 characters, but the minimal repro that I WILL link happens significantly more infrequently

I have only confirmed this behavior on Android, have not tested on iOS.

Expected behaviour

Text inputs in Portal should not duplicate text incorrectly

Code sample

https://github.com/crutchcorn/rn-paper-portal-bug-repro

Screenshots (if applicable)

keyboard-bug

What have you tried

Your Environment

software version
ios or android android v11
react-native 0.64.2
react-native-paper 4.9.1
node 12.16.1
npm or yarn yarn 1.22.5
expo sdk n/a
github-actions[bot] commented 3 years ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

The versions mentioned in the issue for the following packages differ from the latest versions on npm:

Can you verify that the issue still exists after upgrading to the latest versions of these packages?

lukutism commented 3 years ago

Up, faced same issue. :)

alexandreerick commented 3 years ago

Same issue here.

andordavoti commented 3 years ago

Same issue here, facing this after upgrading from React Native v0.62.2 to v0.63.0

lukewalczak commented 2 years ago

Is that issue still valid? Wondering whether the reported bug is specific to the library or react-native in general.

petrometro commented 2 years ago

As of RN 0.67.2 and RNP 4.11.2, I ran into this problem when I had a TextInput inside a Modal (which was inside a Portal), testing on a Samsung Galaxy Tab. The solution of setting autoCorrect={false} on the TextInput worked for me.

JoshuaSkootsky commented 10 months ago

this is a really weird bug and nothing has prepared me for this.

seba9999 commented 1 week ago

Still experiencing it ! Can't say how much time I've lost finding it was linked to Portal !!

I've found hints Here