react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Input inside of Portal duplicates text

Open crutchcorn opened this issue 3 years ago • 7 comments

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

  • Upgrading react-native
  • Upgrading react-native-paper
  • Creating minimal repro
  • Confirmed this happens on both emulator and physical device

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

crutchcorn avatar Jun 18 '21 22:06 crutchcorn

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

  • react-native-vector-icons
  • npm
  • expo

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:

  • yarn (found: 1.22.5, latest: 1.22.10)

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

github-actions[bot] avatar Jun 18 '21 22:06 github-actions[bot]

Up, faced same issue. :)

lukutism avatar Jun 30 '21 15:06 lukutism

Same issue here.

alexandreerick avatar Jul 01 '21 16:07 alexandreerick

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

andordavoti avatar Jul 05 '21 21:07 andordavoti

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

lukewalczak avatar Nov 14 '21 11:11 lukewalczak

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.

petrometro avatar Feb 26 '22 13:02 petrometro

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

JoshuaSkootsky avatar Jan 02 '24 02:01 JoshuaSkootsky